summaryrefslogtreecommitdiffstats
path: root/clang/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* Replace a use of hasTrivialDefaultConstructor() with the appropriateDouglas Gregor2012-02-231-1/+1
| | | | | | isTrivial() call. llvm-svn: 151259
* Replace some DenseSets with SmallPtrSets. Apart from the "small" ↵Benjamin Kramer2012-02-232-6/+4
| | | | | | optimization, the current implementation is also a denser. llvm-svn: 151257
* Unique CXXBasePath decls with the SmallVector/pod_sort/std::unique idiom ↵Benjamin Kramer2012-02-231-6/+9
| | | | | | instead of employing a wasteful std::set. llvm-svn: 151255
* Replace the std::map in the init list checker with a DenseMap to reduce ↵Benjamin Kramer2012-02-231-3/+3
| | | | | | malloc thrashing. llvm-svn: 151254
* PR12067: When emitting an evaluated constant structure in C++11 mode, don'tRichard Smith2012-02-231-12/+82
| | | | | | forget the vptrs. llvm-svn: 151245
* Seriously, are injected-class-names that hard?Douglas Gregor2012-02-231-1/+1
| | | | llvm-svn: 151241
* Provide the __is_trivially_assignable type trait, which providesDouglas Gregor2012-02-237-5/+114
| | | | | | | compiler support for the std::is_trivially_assignable library type trait. llvm-svn: 151240
* Two fixes to how we compute visibility:Rafael Espindola2012-02-232-19/+26
| | | | | | | | | | | | * Handle some situations where we should never make a decl more visible, even when merging in an explicit visibility. * Handle attributes in members of classes that are explicitly specialized. Thanks Nico for the report and testing, Eric for the initial review, and dgregor for the awesome test27 :-) llvm-svn: 151236
* Clang now supports lambda expressions.Douglas Gregor2012-02-231-1/+1
| | | | llvm-svn: 151231
* Try to handle qualifiers more consistently for array InitListExprs. Fixes ↵Eli Friedman2012-02-233-9/+10
| | | | | | | | <rdar://problem/10907510>, and makes the ASTs a bit more self-consistent. (I've chosen to keep the qualifiers, but it isn't a strong preference; if anyone prefers removing them, please yell.) llvm-svn: 151229
* Update parser's disambiguation to cope with braced function-style casts inRichard Smith2012-02-232-7/+37
| | | | | | | | | C++11, and with braced-init-list initializers in conditions. This exposed an ambiguity with enum underlying types versus bitfields, which we resolve by treating 'enum E : T {' as always defining an enumeration (even if it would only successfully parse as a bitfield). This appears to be g++ compatible. llvm-svn: 151227
* Turned on support for __declspec(deprecated) in MS compatibility mode.Aaron Ballman2012-02-231-1/+2
| | | | llvm-svn: 151225
* [analyzer] Invalidate the region passed to pthread_setspecific() call.Anna Zaks2012-02-232-2/+26
| | | | | | | | | | | | | | | | | | Make this call an exception in ExprEngine::invalidateArguments: 'int pthread_setspecific(ptheread_key k, const void *)' stores a value into thread local storage. The value can later be retrieved with 'void *ptheread_getspecific(pthread_key)'. So even thought the parameter is 'const void *', the region escapes through the call. (Here we just blacklist the call in the ExprEngine's default logic. Another option would be to add a checker which evaluates the call and triggers the call to invalidate regions.) Teach the Malloc Checker, which treats all system calls as safe about the API. llvm-svn: 151220
* Add a quick TODO.Eric Christopher2012-02-231-0/+1
| | | | llvm-svn: 151217
* Fold debug scope emission into the cleanup scope.Eric Christopher2012-02-231-9/+2
| | | | llvm-svn: 151216
* Revert r151172: Unwind path cleanup for array new list initializers.Chad Rosier2012-02-221-32/+7
| | | | llvm-svn: 151203
* [analyzer] Malloc cleanup:Anna Zaks2012-02-221-99/+82
| | | | | | | | | | | | - We should not evaluate strdup in the Malloc Checker, it's the job of CString checker, so just update the RefState to reflect allocated memory. - Refactor to reduce LOC: remove some wrapper auxiliary functions, make all functions return the state and add the transition in one place (instead of in each auxiliary function). llvm-svn: 151188
* Revert part of r148839 and keep DefaultTargetTriple in the form adjustedJoerg Sonnenberger2012-02-221-0/+6
| | | | | | | | | | by -target and similar options. As discussed in PR 12026, the change broke support for target-prefixed tools, i.e. calling x86_64--linux-ld when compiling for x86_64--linux. Improve the test cases added originally in r149083 to not require execution, just executable files. Document the hack with appropiate FIXME comments. llvm-svn: 151185
* modern objc translator. more writing of modern ivar accessFariborz Jahanian2012-02-221-2/+30
| | | | | | abi. llvm-svn: 151176
* [driver] Add a warning for when -mcpu= is specified without an argument. ThereChad Rosier2012-02-221-0/+6
| | | | | | | are likely many other OPT_xxxx_EQ options that could/should be added here. rdar://10704648 llvm-svn: 151174
* Doug's review comments.Sebastian Redl2012-02-221-1/+1
| | | | llvm-svn: 151173
* Unwind path cleanup for array new list initializers.Sebastian Redl2012-02-221-7/+32
| | | | llvm-svn: 151172
* CodeGen for array new list initializers. Doesn't correctly clean up in the ↵Sebastian Redl2012-02-221-27/+69
| | | | | | face of exceptions yet. llvm-svn: 151171
* Teach overload resolution to prefer user-defined conversion via aDouglas Gregor2012-02-221-0/+48
| | | | | | | | | | lambda closure type's function pointer conversion over user-defined conversion via a lambda closure type's block pointer conversion, always. This is a preference for more-standard code (since blocks are an extension) and a nod to efficiency, since function pointers don't require any memory management. Fixes PR12063. llvm-svn: 151170
* Fix parsing and processing initializer lists in return statements and as ↵Sebastian Redl2012-02-224-19/+41
| | | | | | direct member initializers. llvm-svn: 151155
* Warn about non-standard format strings (pr12017)Hans Wennborg2012-02-222-2/+131
| | | | | | | | | This adds the -Wformat-non-standard flag (off by default, enabled by -pedantic), which warns about non-standard things in format strings (such as the 'q' length modifier, the 'S' conversion specifier, etc.) llvm-svn: 151154
* More ArrayRef-ification of methods.Bill Wendling2012-02-224-8/+7
| | | | llvm-svn: 151152
* ArrayRef-icize the function arguments.Bill Wendling2012-02-223-5/+4
| | | | llvm-svn: 151151
* Use an ArrayRef when we can instead of passing in a SmallVectorImpl reference.Bill Wendling2012-02-224-35/+33
| | | | llvm-svn: 151150
* Throw away stray CXXDefaultArgExprs. Fixes PR12061.Sebastian Redl2012-02-221-0/+7
| | | | | | I think there's a deeper problem here in the way TransformCXXConstructExpr works, but I won't tackle it now. llvm-svn: 151146
* In -fdelayed-template-parsing mode, reenter every scope when late parsing a ↵Francois Pichet2012-02-221-102/+106
| | | | | | | | | | templated function; (Not just the template parameter scope as previously). Also enter the scope stack in the correct order. Otherwise this breaks some invariant during name lookup especially when dealing with shadowed declaration Fix PR11931. llvm-svn: 151140
* Accept braced-init-lists in conditions, and, in passing, dramatically improveRichard Smith2012-02-221-8/+27
| | | | | | the diagnostic for using a parenthesized direct-initializer in a condition. llvm-svn: 151137
* Make sure null initialization in arrays works correctly with ARC types. ↵Eli Friedman2012-02-221-2/+7
| | | | | | <rdar://problem/10907547>. llvm-svn: 151133
* Generate an AST for the conversion from a lambda closure type to aDouglas Gregor2012-02-2215-30/+106
| | | | | | | | | | | | | | | block pointer that returns a block literal which captures (by copy) the lambda closure itself. Some aspects of the block literal are left unspecified, namely the capture variable (which doesn't actually exist) and the body (which will be filled in by IRgen because it can't be written as an AST). Because we're switching to this model, this patch also eliminates tracking the copy-initialization expression for the block capture of the conversion function, since that information is now embedded in the synthesized block literal. -1 side tables FTW. llvm-svn: 151131
* Improve diagnostics a bit for bad member initializers, and fix an obscure ↵Eli Friedman2012-02-221-23/+40
| | | | | | bug involving packs. Fixes PR12049. llvm-svn: 151130
* [analyzer] Malloc checker: mark 'strdup' and 'strndup' as allocators.Anna Zaks2012-02-221-20/+42
| | | | llvm-svn: 151124
* Adding support for Microsoft's thiscall calling convention. Clang side of ↵Aaron Ballman2012-02-221-9/+23
| | | | | | the patch. llvm-svn: 151122
* [analyzer] Malloc: fix another false positive.Anna Zaks2012-02-221-1/+11
| | | | | | | , when we return a symbol reachable to the malloced one via pointer arithmetic. llvm-svn: 151121
* [analyzer] Change naming in bug reports "tainted" -> "untrusted"Anna Zaks2012-02-221-4/+5
| | | | llvm-svn: 151120
* Implement C++11 [expr.call]p11: If the operand to a decltype-specifier is aRichard Smith2012-02-226-14/+133
| | | | | | | | | | | | | | | | | | function call (or a comma expression with a function call on its right-hand side), possibly parenthesized, then the return type is not required to be complete and a temporary is not bound. Other subexpressions inside a decltype expression do not get this treatment. This is implemented by deferring the relevant checks for all calls immediately within a decltype expression, then, when the expression is fully-parsed, checking the relevant constraints and stripping off any top-level temporary binding. Deferring the completion of the return type exposed a bug in overload resolution where completion of the argument types was not attempted, which is also fixed by this change. llvm-svn: 151117
* Fix typo correction of template arguments to once again allow type names.Kaelyn Uhrain2012-02-222-3/+3
| | | | llvm-svn: 151112
* Provide a way to disable auto-generation of preprocessed files during clang Chad Rosier2012-02-221-0/+3
| | | | | | | crash. This can speedup the process of generating a delta reduced test case. rdar://10905465 llvm-svn: 151109
* modern objc translator: fixes a bug where a class declaration with notFariborz Jahanian2012-02-211-10/+9
| | | | | | any implementation in tu was not being translated. llvm-svn: 151106
* objective-c modern translator. accessing ivars using modern abi - wip.Fariborz Jahanian2012-02-211-61/+37
| | | | llvm-svn: 151103
* In the conflict between C++11 [expr.prim.general]p4, which declaresDouglas Gregor2012-02-211-2/+4
| | | | | | | | | | | that 'this' can be used in the brace-or-equal-initializer of a non-static data member, and C++11 [expr.prim.lambda]p9, which says that lambda expressions not in block scope can have no captures, side fully with C++11 [expr.prim.general]p4 by allowing 'this' to be captured within these initializers. This seems to be the intent of non-static data member initializers. llvm-svn: 151101
* Fix a crash in the diangostic code in EvalConstant. PR12043.Eli Friedman2012-02-211-1/+3
| | | | llvm-svn: 151100
* Don't crash on attempts to synthesize an invalid property.John McCall2012-02-211-0/+1
| | | | | | rdar://problem/10904479 llvm-svn: 151089
* Only pop the expression evaluation context corresponding to a lambdaDouglas Gregor2012-02-211-5/+1
| | | | | | | | | expression after we've finished the function body of the corresponding function call operator. Otherwise, ActOnFinishFunctionBody() will see the (unfinished) evaluation context of the lambda expression itself. Fixes PR12031. llvm-svn: 151082
* Don't assume that a valid expression for the first part of a for-statementRichard Smith2012-02-211-2/+1
| | | | | | is non-null when diagnosing a broken attempt to write a for-range-statement. llvm-svn: 151081
* When calling a non variadic format function(vprintf, vscanf, NSLogv, …), ↵Jean-Daniel Dupas2012-02-211-7/+21
| | | | | | warn if the format string argument is a parameter that is not itself declared as a format string with compatible format. llvm-svn: 151080
OpenPOWER on IntegriCloud