summaryrefslogtreecommitdiffstats
path: root/clang/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* More GRState* -> Store changes.Zhongxing Xu2010-02-053-37/+32
| | | | llvm-svn: 95357
* Change LazyCompoundVal to a <Store, MemRegion*> pair. We really don't need toZhongxing Xu2010-02-053-55/+54
| | | | | | spread GRState* everywhere. llvm-svn: 95354
* Rename -cc1 option '-checker-cfref' to '-analyzer-check-objc-mem'.Ted Kremenek2010-02-052-7/+7
| | | | llvm-svn: 95348
* Rename -cc1 option '-warn-objc-missing-dealloc' to ↵Ted Kremenek2010-02-051-1/+1
| | | | | | '-analyzer-check-objc-missing-dealloc'. llvm-svn: 95347
* Rename -cc1 option '-warn-objc-methodsigs' to '-analyzer-check-objc-methodsigs'.Ted Kremenek2010-02-051-1/+1
| | | | llvm-svn: 95346
* Rename -cc1 option '-warn-objc-unused-ivars' to ↵Ted Kremenek2010-02-051-1/+1
| | | | | | '-analyzer-check-objc-unused-ivars'. llvm-svn: 95345
* Rename -cc1 option '-warn-dead-stores' to '-analyzer-check-dead-stores'.Ted Kremenek2010-02-051-1/+1
| | | | llvm-svn: 95343
* Rename -cc1 option '-warn-security-syntactic' to ↵Ted Kremenek2010-02-051-1/+1
| | | | | | '-analyzer-check-security-syntactic'. llvm-svn: 95342
* Fix a nested ivar reference rewriting bug.Fariborz Jahanian2010-02-051-13/+40
| | | | | | (Fixes radar 7607605). llvm-svn: 95341
* Always start tag definitions before completing them. Assert same.John McCall2010-02-053-2/+11
| | | | | | Fixes latent and not-so-latent objc++ and blocks++ bugs. llvm-svn: 95340
* First stage of adding AltiVec supportJohn Thompson2010-02-0512-29/+139
| | | | llvm-svn: 95335
* Fix a crash with ill-formed code within a method in an ill-formedDouglas Gregor2010-02-041-3/+6
| | | | | | | category implementation, which showed up during (attempted) typo correction. Fixes <rdar://problem/7605289>. llvm-svn: 95334
* Extract a common structure for holding information about the definitionJohn McCall2010-02-049-70/+124
| | | | | | | | of a C++ record. Exposed a lot of problems where various routines were silently doing The Wrong Thing (or The Acceptable Thing in The Wrong Order) when presented with a non-definition. Also cuts down on memory usage. llvm-svn: 95330
* Move ParseFormatString() and FormatStringHandler back into the ↵Ted Kremenek2010-02-042-10/+13
| | | | | | analyze_printf namespace. llvm-svn: 95324
* Fix an obscure crash found in the Boost.MPL test suite, along with aDouglas Gregor2010-02-041-16/+58
| | | | | | | | | | | | | | | | | | | | | | | | ton of potential crashes of the same kind. The fundamental problem is that type creation was following a dangerous pattern when using its FoldingSets: 1) Use FindNodeOrInsertPos to see if the type is available 2) If not, and we aren't looking at a canonical type, build the canonical type 3) Build and insert the new node into the FoldingSet The problem here is that building the canonical type can, in very rare circumstances, force the hash table inside the FoldingSet to reallocate. That invalidates the insertion position we computed in step 1, and in step 3 we end up inserting the new node into the wrong place. BOOM! I've audited all of ASTContext, fixing this problem everywhere I found it. The vast majority of wrong code was C++-specific (and *ahem* written by me), so I also audited other major folding sets in the C++ code (e.g., template specializations), but found no other instances of this problem. llvm-svn: 95315
* When binding an lvalue to a reference, we always need to pop temporaries.Anders Carlsson2010-02-041-1/+9
| | | | | | | | | | | | | With this fix, and the other fixes committed today a make check-all with a clang-built LLVM now gives: Expected Passes : 6933 Expected Failures : 46 Unsupported Tests : 40 Unexpected Failures: 27 which means that we pass 99.96% of all tests :) The resulting 27 tests are all LLVMC tests and seem to be because of differences in the clang and gcc drivers. llvm-svn: 95313
* Fix a bug where we would not mark temporaries as conditional when emitting a ↵Anders Carlsson2010-02-041-1/+7
| | | | | | conditional operator as an lvalue. llvm-svn: 95311
* When substituting the template argument for a pointer non-typeDouglas Gregor2010-02-041-10/+41
| | | | | | | | | template parameter, perform array/function decay (if needed), take the address of the argument (if needed), perform qualification conversions (if needed), and remove any top-level cv-qualifiers from the resulting expression. Fixes PR6226. llvm-svn: 95309
* Rename StartConditionalBranch/FinishConditionalBranch to ↵Anders Carlsson2010-02-044-20/+20
| | | | | | BeginConditionalBranch/EndConditionalBranch. llvm-svn: 95308
* Fix another pointer-to-member function miscompile, this time when trying to ↵Anders Carlsson2010-02-041-11/+11
| | | | | | call a virtual member function. llvm-svn: 95307
* Calculate offset correctly when taking the address of a virtual member function.Anders Carlsson2010-02-042-3/+10
| | | | llvm-svn: 95305
* Allow calling convention attributes to apply to types. Patch by Chip Davis!John McCall2010-02-047-13/+151
| | | | llvm-svn: 95291
* Cast evaluation no longer touch GRState.Zhongxing Xu2010-02-045-44/+27
| | | | llvm-svn: 95290
* Specially handle casts to 'void' in AdjustedReturnValueChecker.Ted Kremenek2010-02-041-2/+9
| | | | llvm-svn: 95287
* Remove stray typo.Ted Kremenek2010-02-041-1/+1
| | | | llvm-svn: 95286
* Mangle member expressions. Also invented.John McCall2010-02-041-1/+57
| | | | llvm-svn: 95284
* Now that CastRetrievedVal returns SVal, there is no need to use CastResult.Zhongxing Xu2010-02-043-45/+27
| | | | llvm-svn: 95279
* Add a cautionary note about the mangling I just invented.John McCall2010-02-041-0/+3
| | | | llvm-svn: 95275
* Add mangling support for calls, sizeof/alignof, constructor calls,John McCall2010-02-041-29/+151
| | | | | | float literals, and unresolved lookups (which required hand-wavey extensions). llvm-svn: 95273
* static analyzer: handle casts of a function to a function pointer withTed Kremenek2010-02-044-1/+94
| | | | | | | | a different return type. While we don't emit any errors (yet), at least we avoid cases where we might crash because of an assertion failure later on (when the return type differs from what is expected). llvm-svn: 95268
* Fix rewriting of 'const' __block variables inFariborz Jahanian2010-02-041-2/+16
| | | | | | the rewriter. (Fixes radar 7607781). llvm-svn: 95267
* Don't try to fold DeclRefExprs that point to ParmVarDecls. This had the ↵Anders Carlsson2010-02-031-0/+4
| | | | | | | | | | | | | | side-effect of always folding the expression to the default argument of the parameter. For example: void f(int a = 10) { return a; } would always return 10, regardless of the passed in argument. This fixes another 600 test failures. We're now down to only 137 failures! llvm-svn: 95262
* Fix more rewriting of protocol-quialified 'id' type.Fariborz Jahanian2010-02-031-0/+2
| | | | | | (Fixes radar 7607413). llvm-svn: 95257
* In some contexts, type declarations cannot occur. Pass this information down ↵Sebastian Redl2010-02-033-9/+22
| | | | | | to ParseClassSpecifier, to make its decision easier. Fixes PR6200. llvm-svn: 95255
* don't inform comment handlers about comments in #if 0 blocks,Chris Lattner2010-02-031-7/+9
| | | | | | | | | doing so invalidates the file guard optimization and is not in the spirit of "#if 0" because it is supposed to completely skip everything, even if it isn't lexically valid. Patch by Abramo Bagnara! llvm-svn: 95253
* Define two types to be "compatible" in C++ if they are the same, andDouglas Gregor2010-02-031-9/+6
| | | | | | | remove some age-old FIXMEs and C++ workarounds within the type-compatibility logic. llvm-svn: 95249
* Declarators can have grouping parens. This fixes rdar://7608537.Chris Lattner2010-02-031-0/+1
| | | | llvm-svn: 95246
* Patch to allow reinterpret_cast on objective-c pointers.Fariborz Jahanian2010-02-031-7/+28
| | | | | | (partial fix for radar 7591784). llvm-svn: 95245
* Revert "Numerous changes to selector handling:", this breaks a whole bunch ofDaniel Dunbar2010-02-037-78/+27
| | | | | | working code, for no apparent reason. llvm-svn: 95244
* Top-level const changes do not make a qualification conversion. Fixes PR6089.Sebastian Redl2010-02-031-1/+1
| | | | llvm-svn: 95239
* When determining whether a function without a prototype is compatibleDouglas Gregor2010-02-031-0/+6
| | | | | | | with a function with a prototype, treat parameters of enumeration type based on the enumeration type's promotion type. llvm-svn: 95238
* Handle reference binding in aggregate initializers. Fixes another 47 tests.Anders Carlsson2010-02-031-5/+5
| | | | llvm-svn: 95235
* Add a band-aid fix for clang self-hosting. A better fix will follow shortly.Anders Carlsson2010-02-031-0/+3
| | | | llvm-svn: 95232
* Fix for PR6220: compute the correct type for multicharacter literals.Eli Friedman2010-02-031-0/+2
| | | | llvm-svn: 95228
* More cleanup.Anders Carlsson2010-02-031-10/+14
| | | | llvm-svn: 95226
* Revert the new reference binding code; I came up with a way simpler solution ↵Anders Carlsson2010-02-037-58/+8
| | | | | | for the reference binding bug that is preventing self-hosting. llvm-svn: 95223
* First pass at adding GC support for GNU runtime. GC ivar maps not yet ↵David Chisnall2010-02-031-6/+97
| | | | | | | | constructed, GC flag not set. Please don't try using this yet - the runtime support is still very immature and your code will almost certainly crash if you do. llvm-svn: 95222
* Teach the allocation function overload handling to deal with templates, andChandler Carruth2010-02-031-12/+21
| | | | | | | | | | | prevent a crash on templates when looking for an existing declaration of the predefined global operators. This fixes PR5918. Added an easy test case for the overload handling, but testing the crash is a bit trickier. Created a new test that can use multiple runs with a define to trigger which test case is used so we can test this type of issue. llvm-svn: 95220
* Fix PR6149 by looking at the qualifiers on the referred to type for non-typeChandler Carruth2010-02-031-2/+3
| | | | | | | reference template arguments. Adds test cases for the cv-quals of reference arguments. llvm-svn: 95217
* When a function or variable somehow depends on a type or declarationDouglas Gregor2010-02-035-61/+278
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | that is in an anonymous namespace, give that function or variable internal linkage. This change models an oddity of the C++ standard, where names declared in an anonymous namespace have external linkage but, because anonymous namespace are really "uniquely-named" namespaces, the names cannot be referenced from other translation units. That means that they have external linkage for semantic analysis, but the only sensible implementation for code generation is to give them internal linkage. We now model this notion via the UniqueExternalLinkage linkage type. There are several changes here: - Extended NamedDecl::getLinkage() to produce UniqueExternalLinkage when the declaration is in an anonymous namespace. - Added Type::getLinkage() to determine the linkage of a type, which is defined as the minimum linkage of the types (when we're dealing with a compound type that is not a struct/class/union). - Extended NamedDecl::getLinkage() to consider the linkage of the template arguments and template parameters of function template specializations and class template specializations. - Taught code generation to rely on NamedDecl::getLinkage() when determining the linkage of variables and functions, also considering the linkage of the types of those variables and functions (C++ only). Map UniqueExternalLinkage to internal linkage, taking out the explicit checks for isInAnonymousNamespace(). This fixes much of PR5792, which, as discovered by Anders Carlsson, is actually the reason behind the pass-manager assertion that causes the majority of clang-on-clang regression test failures. With this fix, Clang-built-Clang+LLVM passes 88% of its regression tests (up from 67%). The specific numbers are: LLVM: Expected Passes : 4006 Expected Failures : 32 Unsupported Tests : 40 Unexpected Failures: 736 Clang: Expected Passes : 1903 Expected Failures : 14 Unexpected Failures: 75 Overall: Expected Passes : 5909 Expected Failures : 46 Unsupported Tests : 40 Unexpected Failures: 811 Still to do: - Improve testing - Check whether we should allow the presence of types with InternalLinkage (in addition to UniqueExternalLinkage) given variables/functions internal linkage in C++, as mentioned in PR5792. - Determine how expensive the getLinkage() calls are in practice; consider caching the result in NamedDecl. - Assess the feasibility of Chris's idea in comment #1 of PR5792. llvm-svn: 95216
OpenPOWER on IntegriCloud