- Apr 27, 2011
-
-
Anders Carlsson authored
When compiling with -fno-threadsafe-statics, guard variables for globals with internal linkage don't have to be i64, i8 works just fine! llvm-svn: 130286
-
Douglas Gregor authored
llvm-svn: 130285
-
Douglas Gregor authored
looking at the context and the correction and using a custom diagnostic. Also, enable some Fix-It tests that were somewhat lamely disabled. llvm-svn: 130283
-
Douglas Gregor authored
llvm-svn: 130280
-
Douglas Gregor authored
determine which is a better conversion to "void*", be sure to perform the comparison using the safe-for-id ASTContext::canAssignObjCInterfaces() rather than the asserts-with-id ASTContext::canAssignObjCInterfaces(). Fixes <rdar://problem/9327203>. llvm-svn: 130259
-
Fariborz Jahanian authored
non-bitfield members are ignore. // rdar://8823265 wip llvm-svn: 130257
-
Douglas Gregor authored
the qualifiers (e.g., GC qualifiers) on the type we're converting from, rather than just blindly adopting the qualifiers of the type we're converting to or dropping qualifiers altogether. As an added bonus, properly diagnose GC qualifier mismatches to eliminate a crash in the overload resolution failure diagnostics. llvm-svn: 130255
-
- Apr 26, 2011
-
-
Argyrios Kyrtzidis authored
The size of the array may not be aligned according to alignment of its elements if an alignment attribute is specified in a typedef. Fixes rdar://8665729 & http://llvm.org/PR5637. llvm-svn: 130242
-
John McCall authored
member function, i.e. something of the form 'x.f' where 'f' is a non-static member function. Diagnose this in the general case. Some of the new diagnostics are probably worse than the old ones, but we now get this right much more universally, and there's certainly room for improvement in the diagnostics. llvm-svn: 130239
-
Daniel Dunbar authored
llvm-svn: 130233
-
Fariborz Jahanian authored
(and ignore it for now) - wip. llvm-svn: 130224
-
Argyrios Kyrtzidis authored
Emit a -Wnull-dereference warning for "*null" not just "*null = something". Addresses rdar://9269271. llvm-svn: 130207
-
Argyrios Kyrtzidis authored
Disable a test that fails on windows; for some reason we don't detect that the header has different timestamp. llvm-svn: 130204
-
Ted Kremenek authored
When generating printf fixits, preserve the original formating for unsigned integers (e.g., 'x', 'o'). llvm-svn: 130164
-
Fariborz Jahanian authored
constant-folded. // rdar://9330105 llvm-svn: 130163
-
Argyrios Kyrtzidis authored
llvm-svn: 130162
-
Lenny Maiorani authored
Implements the strncmp() checker just like the strcmp() checker, but with bounds. Requires LLVM svn r129582. llvm-svn: 130161
-
- Apr 25, 2011
-
-
Argyrios Kyrtzidis authored
'extern' variables in functions don't shadow externs in global scope. Fixes rdar://8883302, this time for C++ as well. llvm-svn: 130157
-
Chris Lattner authored
the enum decl, we need to use an integer type the same size as the enumerator, which may not be the promoted type with packed enums. llvm-svn: 130148
-
Fariborz Jahanian authored
This is wip. llvm-svn: 130138
-
Douglas Gregor authored
invalid expression rather than the far-more-generic "error". Fixes a mild regression in error recovery uncovered by the GCC testsuite. llvm-svn: 130128
-
Chandler Carruth authored
only a few lines of the file. Also set their properties to have explicitly native eol sytle. llvm-svn: 130124
-
John Wiegley authored
Patch authored by David Abrahams. These two expression traits (__is_lvalue_expr, __is_rvalue_expr) are used for parsing code that employs certain features of the Embarcadero C++ compiler. llvm-svn: 130122
-
Chandler Carruth authored
update. Despite the diff, nothing but line endings changed here. llvm-svn: 130121
-
Eli Friedman authored
llvm-svn: 130117
-
- Apr 24, 2011
-
-
Sebastian Redl authored
Set the correct anonymous namespace (must be last reopening), and behave correctly in the presence of the ever-annoying linkage specifications. llvm-svn: 130105
-
Sebastian Redl authored
Fix anonymous namespaces in PCH. llvm-svn: 130104
-
Sebastian Redl authored
Synthesizing the definition of an implicit member is an AST modification, so notify any mutation listeners of it. This fixes a crasher in chained PCH, where an implicit destructor in a PCH gets a definition in a chained PCH, which is then lost. However, any further use of the destructor would cause its definition to be regenerated in the final file, hiding the bug. llvm-svn: 130103
-
Sebastian Redl authored
On reading DeclContexts from PCH, check for visible updates even if the context was empty in the original version. Also, if there are any, tell the context that it has external visible decls. This fixes the problem that a namespace that was empty in the initial PCH (could also happen if the initial PCH didn't include any std header but caused implicit creation of namespace std, e.g. due to implicit declaration of a virtual destructor) never found any declaration declared in *any* chained PCH. Very ugly when the chained PCH includes all that std stuff, as the errors were effectively the same as not including std headers. llvm-svn: 130102
-
Sebastian Redl authored
Make the invalid declarator recovery when parsing members work the same as when parsing global decls. It's still rather broken (skipping much too far when the declarator belongs to a function definition), but at least not so broken as to mismatch braces. Tested by the removal of the fixme in the template test case. llvm-svn: 130101
-
Sebastian Redl authored
Store the full list of pending instantiations in a chained PCH. Previously we attempted to store only new pending instantiations, but our filter was incorrect, dropping implicit instantiations of class template members. It's just not worth coming up with a complex filter that is correct, when the only cost is PCH files that are a few hundred bytes (at most) larger. llvm-svn: 130098
-
Francois Pichet authored
This fixes 1 error when parsing MSVC 2008 headers with clang. Must "return true;" even if it is a warning because the rest of the code path assumes that SS is set to something. The parser will get back on its feet and continue parsing the rest of the declaration correctly so it is not a problem. llvm-svn: 130088
-
John McCall authored
function as a template argument where a pointer to function is wanted. Just extend the existing hack. llvm-svn: 130084
-
John McCall authored
I've sent off an email requesting clarification on a few things that I wasn't sure how to handle. This also necessitated making prefixes and unresolved-prefixes get mangled separately. llvm-svn: 130083
-
Douglas Gregor authored
performs name lookup for an identifier and resolves it to a type/expression/template/etc. in the same step. This scheme is intended to improve both performance (by reducing the number of redundant name lookups for a given identifier token) and error recovery (by giving Sema a chance to correct type names before the parser has decided that the identifier isn't a type name). For example, this allows us to properly typo-correct type names at the beginning of a statement: t.c:6:3: error: use of undeclared identifier 'integer'; did you mean 'Integer'? integer *i = 0; ^~~~~~~ Integer t.c:1:13: note: 'Integer' declared here typedef int Integer; ^ Previously, we wouldn't give a Fix-It because the typo correction occurred after the parser had checked whether "integer" was a type name (via Sema::getTypeName(), which isn't allowed to typo-correct) and therefore decided to parse "integer * i = 0" as an expression. By typo-correcting earlier, we typo-correct to the type name Integer and parse this as a declaration. Moreover, in this context, we can also typo-correct identifiers to keywords, e.g., t.c:7:3: error: use of undeclared identifier 'vid'; did you mean 'void'? vid *p = i; ^~~ void and recover appropriately. Note that this is very much a work-in-progress. The new Sema::ClassifyName is only used for expression-or-declaration disambiguation in C at the statement level. The next steps will be to make this work for the same disambiguation in C++ (where functional-style casts make some trouble), then push it further into the parser to eliminate more redundant name lookups. Fixes <rdar://problem/7963833> for C and starts us down the path of <rdar://problem/8172000>. llvm-svn: 130082
-
John McCall authored
APInt::toString doesn't do those, but it's easy to postprocess that output, and that's probably better than adding another knob to that method. llvm-svn: 130081
-
Chandler Carruth authored
should now support all of the C++98 types, and all of the C++0x types Clang supports. llvm-svn: 130079
-
Chandler Carruth authored
'__is_literal' type trait for GCC compatibility. At least one relased version if libstdc++ uses this name for the trait despite it not being documented anywhere. llvm-svn: 130078
-
Chandler Carruth authored
operators in C++ record declarations. This patch starts off by updating a bunch of the standard citations to refer to the draft 0x standard so that the semantics intended for move varianst is clear. Where necessary these are duplicated so they'll be available in doxygen. It adds bit fields to keep track of the state for the move constructs, and updates all the code necessary to track this state (I think) as members are declared for a class. It also wires the state into the various trait-like accessors in the AST's API, and tests that the type trait expressions now behave correctly in the presence of move constructors and move assignment operators. This isn't complete yet due to these glaring FIXMEs: 1) No synthesis of implicit move constructors or assignment operators. 2) I don't think we correctly enforce the new logic for both copy and move trivial checks: that the *selected* copy/move constructor/operator is trivial. Currently this requires *all* of them to be trivial. 3) Some of the trait logic needs to be folded into the fine-grained trivial bits to more closely match the wording of the standard. For example, many of the places we currently set a bit to track POD-ness could be removed by querying other more fine grained traits on demand. llvm-svn: 130076
-
- Apr 23, 2011
-
-
Chandler Carruth authored
'DerivesHasFoo' types for various non-POD constructs in the base class. Only __is_pod and __is_trivial are wired up to these, not sure how much more of this type of exhaustive testing is really interesting. llvm-svn: 130075
-