summaryrefslogtreecommitdiffstats
path: root/clang
Commit message (Collapse)AuthorAgeFilesLines
* Thread-safety analysis: fix bug where shared trylock was treatedDeLesley Hutchins2012-09-202-1/+31
| | | | | | as exclusive. llvm-svn: 164332
* Thread safety analysis: properly canonicalize calls to virtual methods withinDeLesley Hutchins2012-09-202-4/+48
| | | | | | lock expressions. llvm-svn: 164324
* If the range in a for range statement doesn't have a viable begin/end function,Richard Smith2012-09-205-36/+70
| | | | | | | | | | | | | 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
* Fix typo. (s/Explided/Exploded/)David Blaikie2012-09-201-1/+1
| | | | | | Patch by Sean McBride. llvm-svn: 164318
* Improvements to my patch in r164143 perFariborz Jahanian2012-09-208-92/+91
| | | | | | Richard's comments. // rdar://12202422 llvm-svn: 164316
* Make the wchar_t promotion test consistent across different hosts by ↵David Blaikie2012-09-201-2/+2
| | | | | | | | | | | | specifying a target triple. This test behavior differs depending (at least) on whether sizeof(wchar_t) == sizeof(int) or not. When they are equal, the first redeclaration will fail because decltype(+L'x') is unsigned int instead of the expected int. This occurs on ARM. llvm-svn: 164315
* Remove a test that is non-portable (cannot be execute on cross builds, for ↵David Blaikie2012-09-201-18/+0
| | | | | | | | | | | | example) While it might be nice to have a quick end-to-end sanity test, it's just not really the right place for it & would require more work to enable lit to provide a detection flag ("XFAIL: cross" or similar) than the value we get from having this test. Early on it might've made more sense, but these days we've got some pretty good coverage across the stack with more targeted tests. llvm-svn: 164314
* Include types when a definition's type differs from a prior declaration.David Blaikie2012-09-203-3/+3
| | | | | | | | | | | | | 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
* Add some matchers for basic AST nodes.Daniel Jasper2012-09-203-0/+144
| | | | | | | Patch by Gábor Horváth. Review: http://llvm-reviews.chandlerc.com/D45 llvm-svn: 164304
* StmtPrinter: Print floating point literals with the right suffix to ↵Benjamin Kramer2012-09-203-4/+29
| | | | | | | | disambiguate them from integers. Based on a patch by Olaf Krzikalla, UDL fixes by me. llvm-svn: 164303
* Be more consistent about ending suggestions with a '?'Nico Weber2012-09-201-2/+2
| | | | llvm-svn: 164301
* clang/test/Analysis: Fix the declaration of strlen() for 32 bit targets.NAKAMURA Takumi2012-09-202-4/+3
| | | | | | | | | | - Inputs/system-header-simulator.h: Declare strlen() with size_t. - malloc-interprocedural.c: Move the definition of size_t into the header above. Then XFAIL can be pruned. llvm-svn: 164300
* Disable source fortification on Darwin with AddressSanitizer.Alexander Potapenko2012-09-203-0/+12
| | | | | | ASan doesn't play well with -D_FORTIFY_SOURCE, which is enabled by default starting at OS X 10.7 llvm-svn: 164299
* Provide better error messages for incorrect matchers.Daniel Jasper2012-09-201-15/+17
| | | | | | | | | | | | By changing the conversion operator into a conversion constructor, we can enabled based on the template parameters leading to better error messages. E.g.: stmt(decl()) will now create an error message including: note: candidate function not viable: no known conversion from 'clang::ast_matchers::internal::BindableMatcher<clang::Decl>' to 'const clang::ast_matchers::internal::Matcher<clang::Stmt>' for 1st argument llvm-svn: 164298
* test/Analysis/malloc-interprocedural.c: Mark it as XFAIL: cygwin,mingw,msvc ↵NAKAMURA Takumi2012-09-201-0/+2
| | | | | | for now. Investigating. llvm-svn: 164295
* The keywords "true" and "false" shouldn't warn under -Wundef.Eli Friedman2012-09-202-1/+4
| | | | llvm-svn: 164279
* [analyzer] MallocChecker should not do post-call checks on inlined functions.Jordan Rose2012-09-202-2/+39
| | | | | | | | | | | 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-203-29/+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-204-18/+31
| | | | llvm-svn: 164274
* Per C++11 [class.friend]p3, the 'friend' keyword must appear first in aRichard Smith2012-09-206-13/+46
| | | | | | non-function friend declaration. Patch by Josh Magee! llvm-svn: 164273
* PR13881: Add -Wzero-length-array for zero length array extension, and move ↵Richard Smith2012-09-204-3/+5
| | | | | | it into -Wgnu. llvm-svn: 164272
* Fix a small FIXME involving template partial ordering andEli Friedman2012-09-192-16/+28
| | | | | | member function templates with an rvalue ref qualifier. llvm-svn: 164267
* Fix function template partial ordering rules for static vs. non-staticEli Friedman2012-09-193-9/+36
| | | | | | functions. llvm-svn: 164263
* ccc-analyzer: pass -stdlib=libc++ through to the analyzer.Benjamin Kramer2012-09-191-0/+1
| | | | | | Otherwise clang can't analyze code that relies on features provided by libc++. llvm-svn: 164262
* 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-192-0/+25
| | | | 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-192-0/+48
| | | | | | 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-193-5/+46
| | | | | | | LOCKS_EXCLUDED is used on a method with a name that is is not a simple identifier. llvm-svn: 164242
* Fix ABI dependent tests by providing an explicit target triple.David Blaikie2012-09-192-4/+4
| | | | | | Patch by Joey Gouly. llvm-svn: 164239
* Fix test better way.Fariborz Jahanian2012-09-191-5/+5
| | | | llvm-svn: 164234
* Added link to HowToSetupToolingForLLVM.html. Added missing #include to the ↵Alexander Kornienko2012-09-191-0/+3
| | | | | | example. llvm-svn: 164226
* Add some typedefs for clarity.Rafael Espindola2012-09-191-6/+5
| | | | llvm-svn: 164223
* 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-197-22/+16
| | | | | | longer needed after the unused Context member was removed in r164104. llvm-svn: 164196
* Test for r164186.Eli Friedman2012-09-191-0/+14
| | | | llvm-svn: 164187
* Add the TypeSourceInfo for the lambda call operator to the lambda'sEli Friedman2012-09-198-24/+38
| | | | | | | | 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 the freescale_ppc64_tree that should have been included in r164177.Hal Finkel2012-09-186-0/+0
| | | | llvm-svn: 164179
* Add C/C++ header locations for the Freescale SDK.Hal Finkel2012-09-188-0/+28
| | | | | | | | | 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-183-0/+21
| | | | | | Patch by Tobias von Koch! llvm-svn: 164176
* Fix a small bug in the way we handle builtin candidates forEli Friedman2012-09-183-26/+40
| | | | | | 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-182-0/+12
| | | | | | avoid a crash. PR13860. llvm-svn: 164168
* Remove invalid double colon in test case was previously ignored by FileCheck.Benjamin Kramer2012-09-181-1/+1
| | | | llvm-svn: 164167
* minor refactoring of my last check-in.Fariborz Jahanian2012-09-181-2/+2
| | | | llvm-svn: 164145
* c: warn when an integer value comparison with anFariborz Jahanian2012-09-189-47/+262
| | | | | | | | integral expression have the obvious result. Patch reviewed by John McCall off line. // rdar://12202422 llvm-svn: 164143
* Follow up on llvm r164132.Roman Divacky2012-09-181-2/+2
| | | | llvm-svn: 164133
* Warn about self references in in-class initializers.Hans Wennborg2012-09-182-95/+128
| | | | | | | | | | | | | | This makes Clang warn about self references in in-class initializers, for example: struct S { int a = a + 42; }; This basically just moves UninitializedFieldVisitor up a bit in SemaDeclCXX.cpp, and adds a call to it from ActOnCXXInClassMemberInitializer. llvm-svn: 164131
* Fix isDerivedFrom matcher.Daniel Jasper2012-09-182-0/+11
| | | | | | | | | | | | | Without this patch, the isDerivedFrom matcher asserts in the "assert(ClassDecl != NULL);" in the new test, as a DependentTemplateSpecilizationType is not a sub-type of TemplateSpecializationType and also does not offer getAsCXXRecordDecl(). I am not sure why this did not cause problems before. It is now (after the changed implementation of isDerivedFrom) easier to write a matcher that actually gets into this branch of the code. llvm-svn: 164127
OpenPOWER on IntegriCloud