summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST
Commit message (Collapse)AuthorAgeFilesLines
* Implement semantic analysis for C++ [expr.new]p18-20, which describeDouglas Gregor2010-02-261-1/+7
| | | | | | | | | | how we find the operator delete that matches withe operator new we found in a C++ new-expression. This will also need CodeGen support. On a happy note, we're now a "nans" away from building tramp3d-v4. llvm-svn: 97209
* Forgot to include nested protocols in collection, resulting inFariborz Jahanian2010-02-251-1/+3
| | | | | | bogus warning. Fixes radar 7682116. llvm-svn: 97157
* Use CXXPseudoDestructorExpr as the stored representation for dependentDouglas Gregor2010-02-252-3/+21
| | | | | | | | | | | | | | | | expressions that look like pseudo-destructors, e.g., p->T::~T() where p has dependent type. At template instantiate time, we determine whether we actually have a pseudo-destructor or a member access, and funnel down to the appropriate routine in Sema. Fixes PR6380. llvm-svn: 97092
* Retain complete source information for the type after the '~' in aDouglas Gregor2010-02-241-0/+7
| | | | | | | | | | | CXXPseudoDestructorExpr. Update template instantiation for pseudo-destructor expressions to use this source information and to make use of Sema::BuildPseudoDestructorExpr when the base expression is dependent or refers to a scalar type. llvm-svn: 97079
* References to const int parameters with ICE default arguments are not ICEs.John McCall2010-02-241-2/+9
| | | | | | Fixes PR6373. llvm-svn: 97037
* Add support for the weakref attribute. We still produce "alias weak" as ↵Rafael Espindola2010-02-231-2/+1
| | | | | | llvm-gcc does, but are more strict on what uses of weakref we accept. llvm-svn: 96992
* When a reference to a field of a struct/union/class is passed to theCharles Davis2010-02-231-0/+6
| | | | | | | __alignof__ operator, make sure to take into account the packed alignment of the struct/union/class itself. Matches GCC's behavior and fixes PR6362. llvm-svn: 96884
* More support for ivars in class extension.Fariborz Jahanian2010-02-232-0/+25
| | | | llvm-svn: 96850
* Perform two more constructor/destructor code-size optimizations:John McCall2010-02-231-2/+2
| | | | | | | | | | | | | | | | 1) emit base destructors as aliases to their unique base class destructors under some careful conditions. This is enabled for the same targets that can support complete-to-base aliases, i.e. not darwin. 2) Emit non-variadic complete constructors for classes with no virtual bases as calls to the base constructor. This is enabled on all targets and in theory can trigger in situations that the alias optimization can't (mostly involving virtual bases, mostly not yet supported). These are bundled together because I didn't think it worthwhile to split them, not because they really need to be. llvm-svn: 96842
* Don't assert that we have a valid access specifier on an invalidDouglas Gregor2010-02-221-1/+2
| | | | | | declaration. This is the trivial part of PR6365. llvm-svn: 96792
* Set access specifiers on imported declarations.Douglas Gregor2010-02-221-0/+7
| | | | llvm-svn: 96788
* Eliminate the default arguments to ASTContext::getFunctionType(),Douglas Gregor2010-02-211-2/+6
| | | | | | | | fixing up a few callers that thought they were propagating NoReturn information but were in fact saying something about exception specifications. llvm-svn: 96766
* Implement AST import for C++ member functions, including constructors, ↵Douglas Gregor2010-02-211-5/+47
| | | | | | destructors, and conversions. Unfortunately, this cannot be tested yet, since we don't have C++ PCH support. llvm-svn: 96741
* Implement AST importing for C++ namespaces.Douglas Gregor2010-02-211-1/+67
| | | | llvm-svn: 96740
* Collect the code that imports all of the members of a declaration context ↵Douglas Gregor2010-02-211-27/+14
| | | | | | into a single function, ImportDeclContext. Use it rather than explicit loops. No functionality change. llvm-svn: 96739
* Make Decl::isOutOfLine() virtual, and use that to determine when definitionsChandler Carruth2010-02-211-4/+4
| | | | | | | are for out of line declarations more easily. This simplifies the logic and handles the case of out-of-line class definitions correctly. Fixes PR6107. llvm-svn: 96729
* Revert: "Change InitListExpr to allocate the array for holding references"Ted Kremenek2010-02-191-58/+27
| | | | | | | | This was causing buildbot breakage. This reverts commit d46e952cc8cb8d9eed8657d9a0b267910a0f745a. llvm-svn: 96652
* Add a missing break. Cocoa.h can now be merged twice into the same AST contextDouglas Gregor2010-02-191-0/+1
| | | | llvm-svn: 96650
* AST import for CStyleCastExpr. With this, we can import Cocoa.h into an ↵Douglas Gregor2010-02-191-0/+20
| | | | | | empty context llvm-svn: 96648
* AST import for sizeof and alignof expressionsDouglas Gregor2010-02-191-0/+25
| | | | llvm-svn: 96647
* AST import for DeclRefExprsDouglas Gregor2010-02-191-0/+25
| | | | llvm-svn: 96646
* AST import of parenthesized expressions, unary operators, binaryDouglas Gregor2010-02-191-0/+74
| | | | | | operators, and compound assignment operators. llvm-svn: 96643
* Change InitListExpr to allocate the array for holding referencesTed Kremenek2010-02-191-27/+58
| | | | | | | | | | | | | | | | to initializer expressions in an array allocated using ASTContext. This plugs a memory leak when ASTContext uses a BumpPtrAllocator to allocate memory for AST nodes. In my mind this isn't an ideal solution; it would be nice to have a general "vector"-like class that allocates memory using ASTContext, but whose guts could be separated from the methods of InitListExpr itself. I haven't gone and taken this approach yet because it isn't clear yet if we'll eventually want an alternate solution for recylcing memory using by InitListExprs as we are constructing the ASTs. llvm-svn: 96642
* Patch removes IVars list from ObjCInterfaceDecl andFariborz Jahanian2010-02-192-9/+16
| | | | | | instead relies on their DeclContext for iteration, etc. llvm-svn: 96638
* Try to fix the auroraux buildbot. I suspect it has a "#define SEC" somewhere.Benjamin Kramer2010-02-181-6/+6
| | | | llvm-svn: 96577
* AST import for character literalsDouglas Gregor2010-02-181-0/+11
| | | | llvm-svn: 96557
* AST import for forward declarations of Objective-C protocolsDouglas Gregor2010-02-181-0/+45
| | | | llvm-svn: 96555
* Implement import of forward declarations of Objective-C classesDouglas Gregor2010-02-181-1/+42
| | | | llvm-svn: 96554
* AST import of Objective-C categories.Douglas Gregor2010-02-181-4/+85
| | | | llvm-svn: 96551
* Add 'ns_returns_not_retained' and 'cf_returns_not_retained' attributes toTed Kremenek2010-02-181-22/+24
| | | | | | | match 'ns_returns_retained' and 'cf_returns_retained' respectively. These are not yet hooked up to the static analyzer. llvm-svn: 96535
* Implement AST importing of ImplicitParamDecls, despite the sad factDouglas Gregor2010-02-171-0/+27
| | | | | | that we can't test it yet. llvm-svn: 96516
* Implement AST merging for Objective-C properties.Douglas Gregor2010-02-171-1/+62
| | | | llvm-svn: 96483
* AST import for Objective-C protocolsDouglas Gregor2010-02-171-1/+67
| | | | llvm-svn: 96478
* Add IBAction attribute to keep the IBOutlet attribute company.Ted Kremenek2010-02-171-0/+4
| | | | llvm-svn: 96447
* Fix unused function warning to handle used attributes and redeclarations. ↵Tanya Lattner2010-02-171-0/+18
| | | | | | Update test case. llvm-svn: 96444
* Implement AST importing and checking for Objective-C method declarations.Douglas Gregor2010-02-171-8/+136
| | | | llvm-svn: 96442
* Implement AST importing of Objective-C instance variables. Douglas Gregor2010-02-171-3/+76
| | | | | | Check superclasses when merging two Objective-C @interfaces. llvm-svn: 96420
* Introduce a new kind of failed result for isLvalue/isModifiableLvalueDouglas Gregor2010-02-161-2/+29
| | | | | | | | which describes temporary objects of class type in C++. Use this to provide a more-specific, remappable diagnostic when takin the address of such a temporary. llvm-svn: 96396
* White-list comma expressions with the literal 0 as their RHS againstJohn McCall2010-02-161-1/+9
| | | | | | unused-value warnings. This is a common macro idiom. llvm-svn: 96326
* Make the various type-decl Types (and their associated ASTContext routines)John McCall2010-02-162-9/+11
| | | | | | accept const decls. llvm-svn: 96325
* Skeleton for importing Objective-C classesDouglas Gregor2010-02-161-1/+97
| | | | llvm-svn: 96306
* Cope with anonymous tags defined within declarators by structurallyDouglas Gregor2010-02-151-82/+142
| | | | | | | | | | | | | | | | | | | | comparing their types under the assumption that they are equivalent, rather than importing the types and then checking for compatibility. A few minor tweaks here: - Teach structural matching to handle compatibility between function types with prototypes and those without prototypes. - Teach structural matching that an incomplete record decl is the same as any other record decl with the same name. - Keep track of pairs of declarations that we have already checked (but failed to find as structurally matching), so we don't emit diagnostics repeatedly. - When importing a typedef of an anonymous tag, be sure to link the imported tag type to its typedef. With these changes, we survive a repeated import of <stdlib.h> and <stdio.h>. Alas, the ASTNodeImporter is getting a little grotty. llvm-svn: 96298
* Reimplement the structural-equality checks used to determine whetherDouglas Gregor2010-02-151-272/+874
| | | | | | | | | | | | | | two types in different AST contexts are equivalent. Rather than transforming the type from one context into the other context, we perform a deep structural comparison of the types. This change addresses a serious problem with recursive data types like struct ListNode { int value; struct ListNode *Next; } xList; llvm-svn: 96278
* Class continuation now has its own property ast forFariborz Jahanian2010-02-151-6/+8
| | | | | | | | those declared in it. This is to allow duplicate property diagnostics for properties declared in class extensions multiple times (radar 7629420) and for future use. llvm-svn: 96276
* Simplify code. If we can reach here, the base must be virtual.Zhongxing Xu2010-02-151-5/+4
| | | | llvm-svn: 96211
* Add newline.Daniel Dunbar2010-02-131-1/+1
| | | | llvm-svn: 96116
* Switch the standard DeclarationName comparator to be a tri-valued comparator.John McCall2010-02-131-18/+29
| | | | | | | Use that while fixing a nasty misuse of qsort in vtable codegen which, somehow, has not actually caused a crash. llvm-svn: 96062
* Fix for PR6274: teach constant folding to evaluate __builtin_expect.Eli Friedman2010-02-131-2/+5
| | | | llvm-svn: 96054
* Funnel changes to the ImportedDecls list in the ASTImporter through aDouglas Gregor2010-02-121-25/+25
| | | | | | | single Imported function, in preparation for fixing a serious design flaw. llvm-svn: 96044
* Implement AST importing and merging for enumeration types andDouglas Gregor2010-02-121-20/+232
| | | | | | enumerators, along with ImplicitCastExprs to make it work. llvm-svn: 96024
OpenPOWER on IntegriCloud