summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST
Commit message (Collapse)AuthorAgeFilesLines
...
* Undo previous check-in.Devang Patel2008-06-061-9/+1
| | | | llvm-svn: 52034
* During interface layout, don't forget super class.Devang Patel2008-06-061-1/+9
| | | | llvm-svn: 52033
* Fix <rdar://problem/5987482> clang on xcode: null dereference in ↵Steve Naroff2008-06-051-0/+22
| | | | | | | | Sema::ActOnMemberReferenceExpr. In addition to fixing the crasher, this commit fixes further improves property lookup (by searching protocols of qualified interfaces..."NSObject <prot>"). llvm-svn: 52001
* Add ObjCInterface layout support.Devang Patel2008-06-041-0/+43
| | | | | | Reuse RecordLayout. llvm-svn: 51968
* Refactoring. Devang Patel2008-06-041-74/+80
| | | | | | Move field layout code in a ASTRecordLayout member fn. llvm-svn: 51966
* Moved LangOptions from TranslationUnit to ASTContext. This induced a ↵Ted Kremenek2008-06-042-10/+10
| | | | | | variety of cleanups in some ASTConsumers. llvm-svn: 51943
* ASTContext::typesAreCompatible(): id is compatible with all qualified id types.Steve Naroff2008-06-041-1/+10
| | | | llvm-svn: 51939
* Move Decl and DeclContext implementations into a new DeclBase.cpp file.Argyrios Kyrtzidis2008-06-042-312/+326
| | | | llvm-svn: 51936
* Make sure we look through categories when searching for a classes property.Steve Naroff2008-06-041-0/+7
| | | | | | Fixes <rdar://problem/5984338> clang on xcode: property implementation must have its declaration in interface 'PBXOpenQuicklyModule' llvm-svn: 51925
* Put back my temporary hack until Eli addresses this in a more complete fashion.Steve Naroff2008-06-031-0/+5
| | | | llvm-svn: 51920
* Re-fix r51907 in a way which doesn't affect valid code. This essentially Eli Friedman2008-06-031-5/+0
| | | | | | | | | | | | | moves the check for the invalid construct to a point where it doesn't affect other uses of isIntegerConstantExpr, and we can warn properly when the extension is used. This makes it a bit more complicated, but it's a lot cleaner. Steve, please tell me if this check is sufficient to handle the relevant system header. I know it's enough to handle the testcase, but I don't know what exactly the original looks like. llvm-svn: 51918
* Change Expr::isIntegerConstantExpr() to allow for pointer types (for GCC ↵Steve Naroff2008-06-031-0/+5
| | | | | | | | compatibility). Note FIXME. Fix <rdar://problem/5977870> clang on xcode: error: arrays with static storage duration must have constant integer length llvm-svn: 51907
* Fix <rdar://problem/5979875> clang on xcode: error: use of undeclared ↵Steve Naroff2008-06-023-1/+20
| | | | | | identifier 'super' llvm-svn: 51888
* fix decl attributes cleaningNuno Lopes2008-06-011-8/+16
| | | | | | this plugs the leak of attributes and also fixes a crash in the test llvm-svn: 51862
* Added "InitializeTU" to ASTConsumer. This is used by Sema::ParseAST to pass aTed Kremenek2008-05-311-0/+6
| | | | | | | | | | | TranslationUnit object instead of an ASTContext. By default it calls Initialize(ASTConstext& Context) (to match with the current interface used by most ASTConsumers). Modified the ObjC-Rewriter to use InitializeTU, and to tell the TranslationUnit to not free its Decls. This is a workaround for: <rdar://problem/5966749> llvm-svn: 51825
* Teach Expr::isLvalue() about ObjC properties. For now, all properties are ↵Steve Naroff2008-05-301-0/+2
| | | | | | writable. Added a FIXME for another day. llvm-svn: 51800
* Fix some strict-aliasing warnings by using Stmt* instead of Expr* in ↵Ted Kremenek2008-05-301-3/+3
| | | | | | VariableArrayType, EnumConstantDecl, and VarDecl. llvm-svn: 51772
* Cleanup/refactoring of Sema struct layout. This patch unifies the structEli Friedman2008-05-301-98/+79
| | | | | | | | | | and union codepaths and fixes some minor bugs. I'm reasonably confident this is accurate, at least for X86. I'll correct any bugs as I find them; I haven't found any for a while, though. llvm-svn: 51762
* Add basic support for properties references (a missing feature).Steve Naroff2008-05-303-0/+32
| | | | | | While it is far from complete, it does fix the following <rdar://problem/5967199> clang on xcode: error: member reference is not to a structure or union llvm-svn: 51719
* Fix one strict-aliasing warning.Ted Kremenek2008-05-291-8/+8
| | | | llvm-svn: 51707
* - Move ObjC Expresssion AST's from Expr.h => ExprObjC.hSteve Naroff2008-05-295-2/+5
| | | | | | - #include ExprObjC.h in many places llvm-svn: 51703
* Assume statement expressions have side effects; this gets rid of a lot Eli Friedman2008-05-271-2/+5
| | | | | | of extra warnings in the Python source. llvm-svn: 51594
* Don't swap function decls, and add them to the scope as they are Eli Friedman2008-05-271-57/+0
| | | | | | | | | | | | | encountered. Mixing up the decls is unintuitive, and confuses the AST destruction code. Fixes PR2360. Note that there is a need to look up the characteristics and declarations of a function associated with a particular name or decl, but the original swapping code doesn't solve it properly. http://lists.cs.uiuc.edu/pipermail/cfe-dev/2008-May/001644.html is one suggestion for how to fix that. llvm-svn: 51584
* Stop leaking the TUDecl.Eli Friedman2008-05-271-0/+2
| | | | llvm-svn: 51575
* Always initialize NEXT_CATCH; fixes a Valgrind uninitialized read error Eli Friedman2008-05-251-3/+2
| | | | | | (originally reported in PR1682). llvm-svn: 51551
* Call the correct destructor.Ted Kremenek2008-05-241-1/+1
| | | | llvm-svn: 51544
* Minor tweak to -ast-dump for ivars.Steve Naroff2008-05-231-0/+2
| | | | llvm-svn: 51508
* Tweak AST dumper for ObjC ivars.Steve Naroff2008-05-232-3/+4
| | | | llvm-svn: 51463
* Move getAccessedFieldNo out of lib/AST/Expr.cpp intoDan Gohman2008-05-221-10/+0
| | | | | | | | | lib/CodeGen/CGExpr.cpp and to change include/clang/AST/Attr.h to use its own enum for visibility types instead of using llvm::GlobalValue::VisibilityTypes. These changes eliminate dependencies in the AST library on LLVM's VMCore library. llvm-svn: 51398
* Remove the unneeded #include of VMCore header "llvm/DerivedTypes.h".Dan Gohman2008-05-211-1/+0
| | | | llvm-svn: 51392
* Add Destroy method to Types, making there destruction more harmonious withTed Kremenek2008-05-212-8/+13
| | | | | | the destruction of Decls and Stmts. llvm-svn: 51385
* Fix potential double-free.Ted Kremenek2008-05-211-1/+1
| | | | llvm-svn: 51381
* Fixup ASTContext::PrintStats()...it was causing several test failures.Steve Naroff2008-05-211-1/+10
| | | | llvm-svn: 51380
* When destroying DeclStmts, also destroy the associated Decl (reclaim its ↵Ted Kremenek2008-05-211-0/+5
| | | | | | memory). llvm-svn: 51379
* Fix the destruction "properly" in the sense that we actually destroy the Eli Friedman2008-05-211-1/+4
| | | | | | | ASTs. This is a hack, but I haven't considered how we really want to do this. llvm-svn: 51364
* PR2347: Fix crash iterating over VLAs; this started triggering because Eli Friedman2008-05-211-5/+4
| | | | | | we now iterate over the whole AST when we destroy it. llvm-svn: 51363
* Don't kill the declarations if the translation unit doesn't own them Eli Friedman2008-05-211-11/+8
| | | | | | | (specifically, for TranslationUnits created from SerializationTest.cpp). Fixes a double-free bug in the serialization tests. llvm-svn: 51362
* Remove hacks from ASTContext now that alignment gets reported correctly.Eli Friedman2008-05-201-11/+3
| | | | llvm-svn: 51322
* Reclaim memory from chains of ScopedDecls, and reclaim memory for the ↵Ted Kremenek2008-05-201-0/+37
| | | | | | initializers of EnumConstantDecls. llvm-svn: 51299
* Delete AST nodes, not just Decls.Ted Kremenek2008-05-201-1/+4
| | | | llvm-svn: 51298
* Reclaim memory allocated for ParmVarDecl's in FunctionDecl::Destroy.Ted Kremenek2008-05-201-1/+6
| | | | | | | | Fixed a bug in ParmVarDecl::param_end(): Handle the case where there are no ParmVarDecls for a FunctionDecl, but its function prototype has formal arguments (can happen with typedefs). llvm-svn: 51297
* When serializing FunctionDecl, serialize out a reference to the previous ↵Ted Kremenek2008-05-201-0/+2
| | | | | | declaration. llvm-svn: 51294
* Remove unnecessary #include (introduced by a recent patch of mine).Ted Kremenek2008-05-201-1/+0
| | | | llvm-svn: 51288
* Try to plug some memory leaks...Ted Kremenek2008-05-203-46/+30
| | | | | | | | | | | | | | | | 1) Sema::ParseAST now constructs a TranslationUnit object to own the top-level Decls, which releases the top-level Decls upon exiting ParseAST. 2) Bug fix: TranslationUnit::~TranslationUnit handles the case where a Decl is added more than once as a top-level Decl. 3) Decl::Destroy is now a virtual method, obviating the need for a special dispatch based on DeclKind. 3) FunctionDecl::Destroy now releases its Body using its Destroy method. 4) Added Stmt::Destroy and Stmt::DestroyChildren, which recursively delete the child ASTs of a Stmt and call their dstors. We may need to special case dstor/Destroy methods for particular Stmt subclasses that own other dynamically allocated objects besides AST nodes. 5) REGRESSION: We temporarily are not deallocating attributes; a FIXME is provided. llvm-svn: 51286
* Added Stmt::DestroyChildren, which will be used by the dstors of the ↵Ted Kremenek2008-05-191-0/+5
| | | | | | subclasses of Stmt to recursively delete their child AST nodes. llvm-svn: 51278
* Make the unused expression warning a bit less aggressive (found in PHP Eli Friedman2008-05-191-0/+4
| | | | | | code). llvm-svn: 51276
* Added CFGBlock::hasBinaryBranchTerminator().Ted Kremenek2008-05-161-0/+24
| | | | llvm-svn: 51190
* Minor cleanup to isBuiltinConstantExpr.Eli Friedman2008-05-161-7/+2
| | | | llvm-svn: 51188
* Removed bogus "return true" in Expr::isConstantExpr that returned true for allTed Kremenek2008-05-151-1/+0
| | | | | | | | | | expressions. This appears to be a regression introduced in r51113 that caused many test cases to fail (there is still a test case in the Analysis directory that is failing): http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20080512/005706.html llvm-svn: 51164
* Implementation of __builtin_shufflevector, a portable builtin capable of Eli Friedman2008-05-142-0/+18
| | | | | | | | | expressing the full flexibility of the LLVM shufflevector instruction. The expected immediate usage is in *mmintrin.h, so that they don't depend on the mess of gcc-inherited (and not completely implemented) shuffle builtins. llvm-svn: 51113
OpenPOWER on IntegriCloud