summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST
Commit message (Collapse)AuthorAgeFilesLines
...
* 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
* Remove AST dependency on VMCore by switching ExtVectorElementExpr off Constant.Nate Begeman2008-05-131-4/+3
| | | | llvm-svn: 51068
* Unbreak build.Ted Kremenek2008-05-121-1/+1
| | | | llvm-svn: 50980
* Grammar cleanup in comment.Ted Kremenek2008-05-121-3/+2
| | | | | | Remove redundant assignment. llvm-svn: 50978
* When reading in the DeclCtx during deserialization, register the DeclCtx of theTed Kremenek2008-05-121-3/+4
| | | | | | | | | ScopedDecl with the backpatcher, and *not* a local variable on the stack. The value of DeclCtx gets filled in *later* by the backpatcher. This fixes: http://llvm.org/bugs/show_bug.cgi?id=2308 llvm-svn: 50976
* fix free/delete mismatch problem in add/mergeProperties (found by valgrind)Nuno Lopes2008-05-101-4/+2
| | | | llvm-svn: 50945
* Extend vector member references to include {.hi, .lo, .e, .o} which return aNate Begeman2008-05-091-30/+39
| | | | | | | | | | | | | vector of the same element type and half the width, with the high, low, even, and odd elements respectively. Allow member references to member references, so that .hi.hi gives you the high quarter of a vector. This is fairly convenient syntax for some insert/extract operations. Remove some unnecessary methods/types in the ExtVectorElementExpr class. llvm-svn: 50892
* Synthesized getter/setter method declarations need not haveFariborz Jahanian2008-05-071-2/+3
| | | | | | | an implementation. This fixes couple of failing prperty tests caused by my previous patch. llvm-svn: 50830
* This patch introduces declaration of getter methods for ObjC2'sFariborz Jahanian2008-05-071-0/+30
| | | | | | | properties. Couple of property tests will fail with this patch. Will fix them next. llvm-svn: 50818
* Fixup InitListExpr::child_begin/end. Thanks to Ted for catching the regression.Steve Naroff2008-05-071-2/+4
| | | | llvm-svn: 50816
* Fix off-by-one error.Steve Naroff2008-05-071-1/+1
| | | | llvm-svn: 50815
* percolate @optional/@required protocols down to ASTs forFariborz Jahanian2008-05-051-1/+2
| | | | | | properties declared in the protocol. llvm-svn: 50662
* Simplify FunctionDecl::AddRedeclaration a bit by using std::swap.Chris Lattner2008-05-041-11/+28
| | | | | | | Fix 'swapping' of attributes to not insert null values into the DeclAttrs map. llvm-svn: 50612
* This patch is about merging ObjC2's properties declared in classFariborz Jahanian2008-05-021-0/+27
| | | | | | | protocols into class's property list and performing semantics on them for while doing so. llvm-svn: 50587
* Fixed bug in ObjCIVarExpr: the child iterator now iterates over the Base ↵Ted Kremenek2008-05-021-2/+7
| | | | | | expression. llvm-svn: 50585
* Bug fix in StmtPrinter to handle pretty-printing ObjCMessageExprs involving ↵Ted Kremenek2008-05-021-5/+11
| | | | | | variadic methods (also did some cosmetic cleanups in the printing output). llvm-svn: 50583
* Use pointer swizziling to unify in ObjCMessageExpr the receiver and ↵Ted Kremenek2008-05-013-9/+65
| | | | | | | | classname "fields". This saves us a pointer. Implemented serialization for ObjCMessageExpr. llvm-svn: 50528
* Extend InitListExpr API/IMPL to support arbitrary add/remove (in support of ↵Steve Naroff2008-05-012-13/+12
| | | | | | the initializer rewrite I am doing). llvm-svn: 50511
* Bug fix in CFG::getBlockEdgeImpl(): Use a BumpPtrAllocator to allocateTed Kremenek2008-04-281-13/+71
| | | | | | | | | std::pair<CFGBlock*, CFGBlock*> that have an 8-byte alignment for use with ProgramPoint. This fixes a bug reported by Argiris where using std::set<> on Windows would result in a 4-byte alignment, not an 8-byte alignment. Fixes: <rdar://problem/5892265> llvm-svn: 50364
* Parsing of namespaces:Argyrios Kyrtzidis2008-04-272-5/+46
| | | | | | | | | -NamespaceDecl for the AST -Checks for name clashes between namespaces and tag/normal declarations. This commit doesn't implement proper name lookup for namespaces. llvm-svn: 50321
* TranslationUnit now owns IdentifierTable, TargetInfo, and Selectors objectsTed Kremenek2008-04-231-2/+19
| | | | | | | | | | | | | | | | when it is constructed via deserialization. This is done by recording a flag indicating that this is the case, and it deletes these objects by getting the references stored in the ASTContext object. This fixes some memory leaks that occurs when we deserialize translation units from bitcode files. The rationale between having TranslationUnit sometimes own these objects and sometimes not is that a TranslationUnit object can be constructed from state generated by the parser (Preprocessor; semantic analyzer, etc.), and thus in these cases won't own the IdentifierTable or Selectors, etc. During deserialization, there is no Preprocessor, so somebody needs to own these objects in order for them to be properly reclaimed. llvm-svn: 50149
* Patch to build AST for property implementation declarations andFariborz Jahanian2008-04-231-0/+9
| | | | | | to print declaration from its AST. llvm-svn: 50117
* "This patch renames Chris Lattner2008-04-222-13/+13
| | | | | | | | | | | DeclContext *CtxDecl -> DeclContext *DeclCtx DeclContext *CD -> DeclContext *DC It makes the code more consistent." Patch by Zhongxing Xu! llvm-svn: 50105
* Allow property in base class to be implemented in a Fariborz Jahanian2008-04-211-0/+4
| | | | | | derived class. llvm-svn: 50074
* Continuation of work on ObjC2's properties.Fariborz Jahanian2008-04-211-0/+55
| | | | | | | | Added iterators, methods to find property and categories. Use them in doing semantic analysis on property implementation declarations. Fixed typos. llvm-svn: 50050
* Clean up handling of function redeclarationsDouglas Gregor2008-04-211-0/+77
| | | | llvm-svn: 50021
* OCUVector -> ExtVector, shorthand for extended vector, per feedback from Chris.Nate Begeman2008-04-185-37/+37
| | | | llvm-svn: 49942
OpenPOWER on IntegriCloud