summaryrefslogtreecommitdiffstats
path: root/clang/lib
Commit message (Collapse)AuthorAgeFilesLines
* Experiment in BodyFarm of structuring AST creation calls in a hierarchy,Ted Kremenek2012-09-211-12/+21
| | | | | | so that they visually look like an AST dump. llvm-svn: 164401
* Create helper method in BodyFarm for creating simple assignments.Ted Kremenek2012-09-211-4/+12
| | | | llvm-svn: 164400
* Add helper method in BodyFarm to create unary dereferences.Ted Kremenek2012-09-211-8/+11
| | | | llvm-svn: 164399
* Add helper method to BodyFarm for creating lvalue-to-rvalue conversions.Ted Kremenek2012-09-211-9/+12
| | | | llvm-svn: 164397
* Add helper method to BodyFarm for creatinging integral casts.Ted Kremenek2012-09-211-2/+10
| | | | llvm-svn: 164396
* Thread-safety analysis: better handling of unreachable blocks. Fixes a bugDeLesley Hutchins2012-09-211-17/+20
| | | | | | | where a call to function marked 'noreturn' is followed by unreachable implicit destructor calls. llvm-svn: 164394
* Re-enable faux-bodies by default.Ted Kremenek2012-09-211-1/+1
| | | | | | Try this again, now that r164392 is in place. llvm-svn: 164393
* Use helper method to create DeclRefExprs in BodyFarm, hopefully allevatingTed Kremenek2012-09-211-20/+34
| | | | | | them being correctly constructed. llvm-svn: 164392
* Add some structuring comments. No functionality change.Ted Kremenek2012-09-211-1/+9
| | | | llvm-svn: 164391
* Update for encapsulating the "construct*AlignmentFromInt" methods.Bill Wendling2012-09-212-2/+2
| | | | llvm-svn: 164374
* Revert r164364, "Flip "faux-bodies" in the analyzer on by default to flush ↵NAKAMURA Takumi2012-09-211-1/+1
| | | | | | | | out bugs." It crashed test/Analysis/Output/blocks.m on some hosts. llvm-svn: 164368
* Make warnings about uninitialized fields include the field name.Hans Wennborg2012-09-212-4/+2
| | | | | | | | | | | This makes the wording more informative, and consistent with the other warnings about uninitialized variables. Also, me and David who reviewed this couldn't figure out why we would need to do a lookup to get the name of the variable; so just print the name directly. llvm-svn: 164366
* Flip "faux-bodies" in the analyzer on by default to flush out bugs.Ted Kremenek2012-09-211-1/+1
| | | | llvm-svn: 164364
* Simplify getRuntimeDefinition() back to taking no arguments.Ted Kremenek2012-09-212-10/+10
| | | | llvm-svn: 164363
* Doxygen-ify a comment.Craig Topper2012-09-211-4/+4
| | | | llvm-svn: 164360
* PR13890: Warn on abstract final classes.David Blaikie2012-09-211-0/+5
| | | | llvm-svn: 164359
* [PCH] After deserializing a DeclContext, if it has external lexical decls ↵Argyrios Kyrtzidis2012-09-212-0/+7
| | | | | | | | | | | | | | but not external visible decls, call DeclContext::setMustBuildLookupTable so that the "lazy decls" bit of the LookupPtr is set. Previously, in non-C++, if there were no new declarations causing the "lazy decls" bit to be set, then DeclContext::lookups_begin() would fail to return the decls from the PCH. Fixes rdar://12316296. llvm-svn: 164351
* Add faux-body support for dispatch_once().Ted Kremenek2012-09-211-10/+110
| | | | llvm-svn: 164348
* ARM: Use a dedicated intrinsic for vector bitwise select.Jim Grosbach2012-09-211-0/+4
| | | | | | | | | | | The expression based expansion too often results in IR level optimizations splitting the intermediate values into separate basic blocks, preventing the formation of the VBSL instruction as the code author intended. In particular, LICM would often hoist part of the computation out of a loop. rdar://11011471 llvm-svn: 164342
* Tidy up. Trailing whitespace and 80 columns.Jim Grosbach2012-09-211-67/+69
| | | | llvm-svn: 164341
* Implement faux-body-synthesis of well-known functions in the static analyzer ↵Ted Kremenek2012-09-219-19/+199
| | | | | | | | | | | | | | | | | | | | | | | when their implementations are unavailable. Start by simulating dispatch_sync(). This change is largely a bunch of plumbing around something very simple. We use AnalysisDeclContext to conjure up a fake function body (using the current ASTContext) when one does not exist. This is controlled under the analyzer-config option "faux-bodies", which is off by default. The plumbing in this patch is largely to pass the necessary machinery around. CallEvent needs the AnalysisDeclContextManager to get the function definition, as one may get conjured up lazily. BugReporter and PathDiagnosticLocation needed to be relaxed to handle invalid locations, as the conjured body has no real source locations. We do some primitive recovery in diagnostic generation to generate some reasonable locations (for arrows and events), but it can be improved. llvm-svn: 164339
* Serialize the 'IsConstexpr' bit of VarDecls. Fixes <rdar://problem/12328814>.Douglas Gregor2012-09-202-1/+7
| | | | llvm-svn: 164335
* Thread-safety analysis: fix bug where shared trylock was treatedDeLesley Hutchins2012-09-201-1/+1
| | | | | | as exclusive. llvm-svn: 164332
* Thread safety analysis: properly canonicalize calls to virtual methods withinDeLesley Hutchins2012-09-201-4/+16
| | | | | | lock expressions. llvm-svn: 164324
* If the range in a for range statement doesn't have a viable begin/end function,Richard Smith2012-09-203-29/+49
| | | | | | | | | | | | | but can be dereferenced to form an expression which does have viable begin/end functions, then typo-correct the range, even if something else goes wrong with the statement (such as inaccessible begin/end or the wrong type of loop variable). In order to ensure we recover correctly and produce any followup diagnostics in this case, redo semantic analysis on the for-range statement outside of the diagnostic trap, after issuing the typo-correction. llvm-svn: 164323
* Improvements to my patch in r164143 perFariborz Jahanian2012-09-201-18/+16
| | | | | | Richard's comments. // rdar://12202422 llvm-svn: 164316
* Include types when a definition's type differs from a prior declaration.David Blaikie2012-09-201-1/+1
| | | | | | | | | | | | | This is some really old code (took me a while to find the test cases) & the diagnostic text is slightly incorrect (it should really only apply to re/declarations/, redefinitions are an error regardless of whether the types match). Not sure if anyone cares about it, though. For now this just makes the diagnostic more clear in less obvious cases where the type of a declaration might not be explicitly written (eg: because it uses decltype) llvm-svn: 164313
* StmtPrinter: Print floating point literals with the right suffix to ↵Benjamin Kramer2012-09-201-2/+27
| | | | | | | | disambiguate them from integers. Based on a patch by Olaf Krzikalla, UDL fixes by me. llvm-svn: 164303
* Disable source fortification on Darwin with AddressSanitizer.Alexander Potapenko2012-09-201-0/+3
| | | | | | ASan doesn't play well with -D_FORTIFY_SOURCE, which is enabled by default starting at OS X 10.7 llvm-svn: 164299
* The keywords "true" and "false" shouldn't warn under -Wundef.Eli Friedman2012-09-201-1/+3
| | | | llvm-svn: 164279
* [analyzer] MallocChecker should not do post-call checks on inlined functions.Jordan Rose2012-09-201-0/+3
| | | | | | | | | | | If someone provides their own function called 'strdup', or 'reallocf', or even 'malloc', and we inlined it, the inlining should have given us all the malloc-related information we need. If we then try to attach new information to the return value, we could end up with spurious warnings. <rdar://problem/12317671> llvm-svn: 164276
* Revert "[analyzer] Remove constraints on dead symbols as part of ↵Jordan Rose2012-09-202-8/+9
| | | | | | | | | | | | | | | | | removeDeadBindings." While we definitely want this optimization in the future, we're not currently handling constraints on symbolic /expressions/ correctly. These should stay live even if the SymExpr itself is no longer referenced because could recreate an identical SymExpr later. Only once the SymExpr can no longer be recreated -- i.e. a component symbol is dead -- can we safely remove the constraints on it. This liveness issue is tracked by <rdar://problem/12333297>. This reverts r163444 / 24c7f98828e039005cff3bd847e7ab404a6a09f8. llvm-svn: 164275
* Handle lambdas where the lambda-declarator is an explicit "(void)". PR13854.Eli Friedman2012-09-202-18/+26
| | | | llvm-svn: 164274
* Per C++11 [class.friend]p3, the 'friend' keyword must appear first in aRichard Smith2012-09-202-11/+15
| | | | | | non-function friend declaration. Patch by Josh Magee! llvm-svn: 164273
* Fix a small FIXME involving template partial ordering andEli Friedman2012-09-191-16/+13
| | | | | | member function templates with an rvalue ref qualifier. llvm-svn: 164267
* Fix function template partial ordering rules for static vs. non-staticEli Friedman2012-09-191-9/+12
| | | | | | functions. llvm-svn: 164263
* Grammar.Eric Christopher2012-09-191-1/+1
| | | | llvm-svn: 164260
* Update and expand comment.Eric Christopher2012-09-191-2/+4
| | | | llvm-svn: 164254
* Handle a captured this for the debug information as well.Eric Christopher2012-09-191-0/+10
| | | | llvm-svn: 164253
* Fix awkward comment.Eric Christopher2012-09-191-1/+1
| | | | llvm-svn: 164252
* Thread-safety analysis: Fix warning when EXCLUSIVE_LOCKS_REQUIREDDeLesley Hutchins2012-09-191-0/+14
| | | | | | is placed on a function that has no path to the exit block. llvm-svn: 164244
* Thread-safety analysis: fix ICE when EXCLUSIVE_LOCKS_REQUIRED orDeLesley Hutchins2012-09-192-5/+8
| | | | | | | LOCKS_EXCLUDED is used on a method with a name that is is not a simple identifier. llvm-svn: 164242
* ASTWriter: Tighten up assertions when emitting a declaration name.Benjamin Kramer2012-09-191-7/+9
| | | | | | | | clang has recently started to warn about the enum compares: lib/Serialization/ASTWriter.cpp:2760:31: warning: comparison of literal 256 with expression of type 'clang::DeclarationName::NameKind' is always true [-Wtautological-constant-out-of-range-compare] llvm-svn: 164220
* Update clang for API change.Benjamin Kramer2012-09-191-1/+3
| | | | llvm-svn: 164218
* Remove Context argument from TemplateDeductionInfo constructor. It was no ↵Craig Topper2012-09-196-15/+15
| | | | | | longer needed after the unused Context member was removed in r164104. llvm-svn: 164196
* Add the TypeSourceInfo for the lambda call operator to the lambda'sEli Friedman2012-09-196-18/+22
| | | | | | | | definition info; it needs to be there because the mangler needs to access it before we're finished defining the lambda class. PR12808. llvm-svn: 164186
* Add C/C++ header locations for the Freescale SDK.Hal Finkel2012-09-181-0/+8
| | | | | | | | | The Freescale SDK is based on OpenEmbedded, and this might be useful for other OpenEmbedded-based configurations as well. With minor modifications, patch by Tobias von Koch! llvm-svn: 164177
* Add e500mc and e5500 to the list of valid PPC CPU names.Hal Finkel2012-09-182-0/+4
| | | | | | Patch by Tobias von Koch! llvm-svn: 164176
* Fix a small bug in the way we handle builtin candidates forEli Friedman2012-09-181-10/+12
| | | | | | relational operators of enumeration type. From the gcc testsuite. llvm-svn: 164171
* Add an extra check for invalid decls in the lambda semantic analysis to ↵Eli Friedman2012-09-181-0/+4
| | | | | | avoid a crash. PR13860. llvm-svn: 164168
OpenPOWER on IntegriCloud