summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST
Commit message (Collapse)AuthorAgeFilesLines
* 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
* Don't error when setting a sub-structure variable via objc propertiesFariborz Jahanian2010-02-121-6/+1
| | | | | | in objective-c++ mode (do it for objective-c only). llvm-svn: 96012
* Patch to fix a warning which exposed a bug in buildingFariborz Jahanian2010-02-121-12/+12
| | | | | | | a qualified objective-c pointer type. Fixes radar 7638810. (Also removes a FIXME). llvm-svn: 96003
* Simplify incomplete-array merging code in the AST importer, thanks toDouglas Gregor2010-02-121-24/+14
| | | | | | Daniel's suggestion. llvm-svn: 95987
* Fix a latent bug found by Ahmed Charles, where we were callingDouglas Gregor2010-02-121-1/+1
| | | | | | ASTContext::getFunctionType with the wrong set of arguments. llvm-svn: 95986
* Handle AST merges of incomplete class types. Douglas Gregor2010-02-121-40/+50
| | | | llvm-svn: 95941
* Fix leak in CXXNewExpr where the SubExprs array would get allocated directly ↵Ted Kremenek2010-02-111-2/+10
| | | | | | using 'new[]' instead of the allocator associated with ASTContext. llvm-svn: 95933
* Fix re-allocation in AttrWithString::ReplaceString() to use the allocator ↵Ted Kremenek2010-02-111-1/+1
| | | | | | assosciated with ASTContext. llvm-svn: 95931
* Allocate the SubExprs array in ObjCMessageExpr using the allocator ↵Ted Kremenek2010-02-111-15/+25
| | | | | | associated with ASTContext. This fixes yet another leak (<rdar://problem/7639260>). llvm-svn: 95930
* When AST merging for record declarations fails, warn about theDouglas Gregor2010-02-111-35/+190
| | | | | | | | | | | | | | | | | | | | | | | | | | incompatibility and show where the structural differences are. For example: struct1.c:36:8: warning: type 'struct S7' has incompatible definitions in different translation units struct S7 { int i : 8; unsigned j : 8; } x7; ^ struct1.c:36:33: note: bit-field 'j' with type 'unsigned int' and length 8 here struct S7 { int i : 8; unsigned j : 8; } x7; ^ struct2.c:33:33: note: bit-field 'j' with type 'unsigned int' and length 16 here struct S7 { int i : 8; unsigned j : 16; } x7; ^ There are a few changes to make this work: - ASTImporter now has only a single Diagnostic object, not multiple diagnostic objects. Otherwise, having a warning/error printed via one Diagnostic and its note printed on the other Diagnostic could cause the note to be suppressed. - Implemented import functionality for IntegerLiteral (along with general support for statements and expressions) llvm-svn: 95900
* More vtable layout dumper improvements. Handle destructors, dump the ↵Anders Carlsson2010-02-111-4/+5
| | | | | | complete function type of the member functions (using PredefinedExpr::ComputeName. llvm-svn: 95887
* Use the allocator associated with ASTContext to allocate the argsTed Kremenek2010-02-111-1/+17
| | | | | | | | array associated with NonNullAttr. This fixes yet another leak when ASTContext uses a BumpPtrAllocator. Fixes: <rdar://problem/7637150> llvm-svn: 95863
* Have ~ASTContext() delete StoredDeclsMap (internal to DeclContext) byTed Kremenek2010-02-112-5/+34
| | | | | | | | | storing the set of StoredDeclsMaps in an internal vector of void*. This isn't an ideal solution, but for the time being this fixes a major memory leak with these DenseMaps not being freed. Fixes: <rdar://problem/7634755> llvm-svn: 95861
* Remove use of 'std::string' from Attr objects, using instead a byteTed Kremenek2010-02-112-15/+40
| | | | | | | | | array allocated using the allocator in ASTContext. This addresses these strings getting leaked when using a BumpPtrAllocator (in ASTContext). Fixes: <rdar://problem/7636765> llvm-svn: 95853
* Remove another redundant ASTContext parameterDouglas Gregor2010-02-112-3/+4
| | | | llvm-svn: 95843
* Eliminate a bunch of unnecessary ASTContexts from members functions ofDouglas Gregor2010-02-113-25/+20
| | | | | | Decl subclasses. No functionality change. llvm-svn: 95841
* Diagnose when user provided getter is being used as lvalueFariborz Jahanian2010-02-111-5/+13
| | | | | | using property dot-syntax. Fixes radar 7628953. llvm-svn: 95838
* Eliminate the ASTContext parameter from RecordDecl::getDefinition()Douglas Gregor2010-02-114-6/+5
| | | | | | | and CXXRecordDecl::getDefinition(); it's totally unnecessary. No functionality change. llvm-svn: 95836
* Implement basic AST merging for classes, structs, and unions in C.Douglas Gregor2010-02-111-0/+228
| | | | llvm-svn: 95833
* Add support for the force_align_arg_pointer attribute. This is an x86-specificCharles Davis2010-02-101-0/+1
| | | | | | | | attribute, so it uses Anton's new target-specific attribute support. It's supposed to ensure that the stack is 16-byte aligned, but since necessary support is lacking from LLVM, this is a no-op for now. llvm-svn: 95820
* Move TypedefDecl importer to match the ordering in DeclNodes. No ↵Douglas Gregor2010-02-101-56/+56
| | | | | | functionality change. llvm-svn: 95805
* Implement basic support for merging function declarations acrossDouglas Gregor2010-02-101-35/+178
| | | | | | translation units. llvm-svn: 95794
* Implement AST importing and merging for typedefs. As part of this, provide a ↵Douglas Gregor2010-02-101-14/+84
| | | | | | lame implementation for importing TypeSourceInfos. llvm-svn: 95783
* Teach AST merging that variables with incomplete array types can beDouglas Gregor2010-02-101-0/+27
| | | | | | | | merged with variables of constant array types. Also, make sure that we call DiagnosticClient's BeginSourceFile/EndSourceFile, so that it has a LangOptions to work with. llvm-svn: 95782
* Reverse a partial fix patch for radar 7214820. It broke some code andFariborz Jahanian2010-02-101-16/+3
| | | | | | I don't have time to refix it for now. llvm-svn: 95733
OpenPOWER on IntegriCloud