summaryrefslogtreecommitdiffstats
path: root/clang
Commit message (Collapse)AuthorAgeFilesLines
...
* Unrevert r155951, reverted in r155962, with two changes:Richard Smith2012-05-023-15/+54
| | | | | | | | | * Work around build failures due to gcc 4.2 bugs. * Remove BodyIndexer::TraverseCXXOperatorCallExpr, which was not being called prior to this change, and whose presence disables a RecursiveASTVisitor stack space optimization after this change. llvm-svn: 155969
* [analyzer] RetainRelease: Self assignment should not suppress a leakAnna Zaks2012-05-022-1/+10
| | | | | | warning. llvm-svn: 155966
* Try harder to recognize hidden tag type names in potential declarations insteadKaelyn Uhrain2012-05-022-44/+90
| | | | | | of giving unhelpful errors about undeclared identifers and missing semicolons. llvm-svn: 155965
* [analyzer] Fix an assertion failure triggered by the analyzer buildbot.Anna Zaks2012-05-022-17/+23
| | | | llvm-svn: 155964
* [analyzer] Fix the 'ptr = ptr' false negative in the Malloc checker.Anna Zaks2012-05-022-1/+22
| | | | llvm-svn: 155963
* Revert "Fix RecursiveASTVisitor's data recursion to call the Traverse* ↵Andrew Trick2012-05-012-51/+9
| | | | | | | functions if they" FAIL: Clang :: Index/index-many-call-ops.cpp llvm-svn: 155962
* Eliminate Sema::CompareMethodParamsInBaseAndSuper() entirely, byDouglas Gregor2012-05-012-71/+35
| | | | | | | | folding its one check into the normal path for checking overridden Objective-C methods. Good for another 3.6% speedup on the test case in <rdar://problem/11004361>. llvm-svn: 155961
* The semantic checking that verifies whether an Objective-C methodDouglas Gregor2012-05-012-20/+30
| | | | | | | | | | | | | | | | declared in a subclass has consistent parameter types with a method having the same selector in a superclass performs a significant number of lookups into the class hierarchy. In the example in <rdar://problem/11004361>, we spend 4.7% of -fsyntax-only time in these lookups. Optimize away most of the calls to this routine (Sema::CompareMethodParamsInBaseAndSuper) by first checking whether we have ever seen *any* method with that selector (using the global selector table). Since most selectors are unique, we can avoid the cost of this name lookup in many cases, for a 3.3% speedup. llvm-svn: 155958
* Add a missing RequireCompleteType call when synthesizing properties. ↵Eli Friedman2012-05-014-23/+57
| | | | | | | | <rdar://problem/11333367>. While I'm here, fix source locations for other diagnostics related to property synthesis. llvm-svn: 155953
* Utilize getLocStart()/getLocEnd() on my recent change.Argyrios Kyrtzidis2012-05-011-9/+6
| | | | llvm-svn: 155952
* Fix RecursiveASTVisitor's data recursion to call the Traverse* functions if theyRichard Smith2012-05-012-9/+51
| | | | | | | have been overridden in the derived class. Also, remove a non-functional implementation of an incorrect optimization for ParenExprs. llvm-svn: 155951
* Teach SValBuilder to handle casts of symbolic pointer values to an integer ↵Ted Kremenek2012-05-012-1/+18
| | | | | | twice. Fixes <rdar://problem/11212866>. llvm-svn: 155950
* Clean up changes suggested by Douglas Gregor:Patrick Beard2012-05-011-13/+19
| | | | | | | | | | | | BuildObjCNumericLiteral() and BuildObjCBoxedExpr() now both using PerformCopyInitialization() rather than PerformImplicitConversion(), which suppresses errors. In BuildObjCBoxedExpr(): no longer calling .getCanonicalType(), ValueType->getAs() will remove the minimal amount of sugar. Using ValueType->isBuiltinType() instead of isa<BuiltinType>(ValueType). llvm-svn: 155949
* Fix test cases broken by 155936.David Blaikie2012-05-012-5/+5
| | | | llvm-svn: 155948
* [analyzer] Test case reported for a reported false positive, now fixed.Anna Zaks2012-05-011-0/+9
| | | | llvm-svn: 155945
* [analyzer] Construct a SymExpr even when the constraint solver cannotAnna Zaks2012-05-014-34/+34
| | | | | | | | | | | | | | | | | | | | | | reason about the expression. This essentially keeps more history about how symbolic values were constructed. As an optimization, previous to this commit, we only kept the history if one of the symbols was tainted, but it's valuable keep the history around for other purposes as well: it allows us to avoid constructing conjured symbols. Specifically, we need to identify the value of ptr as ElementRegion (result of pointer arithmetic) in the following code. However, before this commit '(2-x)' evaluated to Unknown value, and as the result, 'p + (2-x)' evaluated to Unknown value as well. int *p = malloc(sizeof(int)); ptr = p + (2-x); This change brings 2% slowdown on sqlite. Fixes radar://11329382. llvm-svn: 155944
* Extend the error about incompatible visibility attributes in differentRafael Espindola2012-05-013-1/+24
| | | | | | decls to work on function templates specializations. llvm-svn: 155943
* We don't need a lengthy quote from the wrong standard.Douglas Gregor2012-05-011-20/+0
| | | | llvm-svn: 155942
* Add test cases for r155935.Douglas Gregor2012-05-012-0/+110
| | | | llvm-svn: 155940
* Revert r155933Douglas Gregor2012-05-011-0/+4
| | | | llvm-svn: 155939
* Workaround a miscompile in 483.xalancbmk while we figure it out.David Blaikie2012-05-012-3/+4
| | | | llvm-svn: 155938
* During block layout, after padding up to the max field alignment,John McCall2012-05-012-1/+20
| | | | | | | the alignment might actually exceed the max field alignment; don't assert in this case. llvm-svn: 155937
* Diagnostics should start with a lower-case letter.Patrick Beard2012-05-011-1/+1
| | | | llvm-svn: 155936
* In C++11 mode, implement the C++11 semantics forDouglas Gregor2012-05-012-4/+9
| | | | | | | | | | | [basic.lookup.classref]p1 and p4, which concerns name lookup for nested-name-specifiers and template names, respectively, in a member access expression. C++98/03 forces us to look both in the scope of the object and in the current scope, then compare the results. C++11 just takes the result from the scope of the object, if something is found. Fixes <rdar://problem/11328502>. llvm-svn: 155935
* Fix CMake buildDouglas Gregor2012-05-011-4/+0
| | | | llvm-svn: 155933
* Test verified.John McCall2012-05-011-1/+0
| | | | llvm-svn: 155932
* Spacing.Chad Rosier2012-05-011-1/+1
| | | | llvm-svn: 155931
* Implement simplify_type traits for redecl_iterator.David Blaikie2012-05-012-1/+18
| | | | | | Based on Chandler Carruth's feedback on r155869. llvm-svn: 155929
* Remove variables made dead by r155923David Blaikie2012-05-011-2/+0
| | | | | | This makes Clang's build warning free again. llvm-svn: 155928
* Get rid of storelv4si builtin as it can be expressed directly. This is generalChad Rosier2012-05-014-4/+10
| | | | | | | | | | | | | | | | | | | | | | | | goodness because it provides opportunites to cleanup things. For example, uint64_t t1(__m128i vA) { uint64_t Alo; _mm_storel_epi64((__m128i*)&Alo, vA); return Alo; } was generating movq %xmm0, -8(%rbp) movq -8(%rbp), %rax and now generates movd %xmm0, %rax rdar://11282581 llvm-svn: 155924
* Remove dead code found by static analyzer.Ted Kremenek2012-05-011-5/+0
| | | | llvm-svn: 155923
* Push variable declaration into nested scope (the only place where it is ↵Ted Kremenek2012-05-011-3/+1
| | | | | | used). Found by static analyzer. llvm-svn: 155922
* modern objective-c translation of private ivars.Fariborz Jahanian2012-05-012-24/+69
| | | | | | // rdar://11351299 llvm-svn: 155921
* Restructure some of the member-pointer tests, implicitlyJohn McCall2012-05-014-71/+80
| | | | | | | | removing some that were added without a triple (and moving their tests into files that appropriately test multiple architectures). llvm-svn: 155920
* Unify Options.td and CC1Options.td, in a first step towards unifying the ↵James Molloy2012-05-0117-622/+424
| | | | | | | | serialization logic in Frontend and Driver. Reviewed by Eric, Doug and Chandler, and here: http://llvm.org/reviews/r/7/ llvm-svn: 155916
* Make some helper functions static.Benjamin Kramer2012-05-011-8/+7
| | | | llvm-svn: 155914
* clang/test/CodeGenCXX: Fix two tests, destructors.cpp and ↵NAKAMURA Takumi2012-05-012-2/+2
| | | | | | microsoft-abi-array-cookies.cpp, for -Asserts. llvm-svn: 155913
* clang/test/Rewriter: Remove XFAIL and add -U__declspec to other 9 tests. ↵NAKAMURA Takumi2012-05-018-21/+10
| | | | | | mingw32 tends to define built-in __declspec. llvm-svn: 155911
* clang/test/Rewriter/rewrite-modern-extern-c-func-decl.mm: Remove XFAIL and ↵NAKAMURA Takumi2012-05-011-5/+2
| | | | | | add -U__declspec. mingw32 tends to define built-in __declspec. llvm-svn: 155910
* Add a disclaimer to the new test, plus a user-declared ctorJohn McCall2012-05-011-1/+2
| | | | | | to force the emission of vtordisps. llvm-svn: 155906
* Add support for laying out vtordisps according to our currentJohn McCall2012-05-015-55/+461
| | | | | | | working knowledge of the Microsoft ABI. Based on a patch by Dmitry Sokolov. llvm-svn: 155905
* Fix compilation with mingw-w64.Abramo Bagnara2012-05-011-0/+4
| | | | llvm-svn: 155904
* Enable AVX on AMD Bulldozer processors.Craig Topper2012-05-011-1/+1
| | | | llvm-svn: 155900
* Abstract the emission of global destructors into ABI-specific codeJohn McCall2012-05-018-67/+148
| | | | | | | | | | | | | and only consider using __cxa_atexit in the Itanium logic. The default logic is to use atexit(). Emit "guarded" initializers in Microsoft mode unconditionally. This is definitely not correct, but it's closer to correct than just not emitting the initializer. Based on a patch by Timur Iskhodzhanov! llvm-svn: 155894
* PR12710 - broken default argument handling for templates.David Blaikie2012-05-013-10/+26
| | | | | | | | | | | | | | | I broke this in r155838 by not actually instantiating non-dependent default arg expressions. The motivation for that change was to avoid producing duplicate conversion warnings for such default args (we produce them once when we parse the template - there's no need to produce them at each instantiation) but without actually instantiating the default arg, things break in weird ways. Technically, I think we could still get the right diagnostic experience without the bugs if we instantiated the non-dependent args (for non-dependent params only) immediately, rather than lazily. But I'm not sure if such a refactoring/ change would be desirable so here's the conservative fix for now. llvm-svn: 155893
* Place several uncovered warnings under warning flags, and tweak diagnostic ↵Ted Kremenek2012-05-015-11/+13
| | | | | | output including the term "gc" (in lowercase). llvm-svn: 155892
* Remove some not-very-stable assumptions from this testcase.John McCall2012-05-011-9/+9
| | | | llvm-svn: 155889
* Teach RetainCountchecker about IORegistryEntrySearchCFProperty returning ↵Ted Kremenek2012-05-011-0/+1
| | | | | | retained objects. I know there is an SDK enhancement request for this to have the cf_returns_retained annotation, so this is just a stop gap. llvm-svn: 155887
* Refactor the C++ ABI code a little bit to take advantage ofJohn McCall2012-05-017-168/+251
| | | | | | | | what I'm going to treat as basically universal properties of array-cookie code. Implement MS array cookies on top of that. Based on a patch by Timur Iskhodzhanov! llvm-svn: 155886
* Fix use of uninitialized variable caught by GCC's -Wmaybe-uninitialized.David Blaikie2012-05-011-1/+3
| | | | | | Review by Doug Gregor. llvm-svn: 155880
OpenPOWER on IntegriCloud