Commit Graph

12 Commits

Author SHA1 Message Date
Daniel Dunbar 56fdb6ae69 More #include cleaning
- Kill unnecessary #includes in .cpp files. This is an automatic
   sweep so some things removed are actually used, but happen to be
   included by a previous header. I tried to get rid of the obvious
   examples and this was the easiest way to trim the #includes in one
   fell swoop.
 - We now return to regularly scheduled development.

llvm-svn: 54632
2008-08-11 06:23:49 +00:00
Nico Weber de565e3bc9 remove spaces at eol to test commit access
llvm-svn: 54381
2008-08-05 23:15:29 +00:00
Ted Kremenek 4f8792b616 Added decl_iterator to DeclStmt to provide an abstract interface to iterate over the ScopedDecls of a DeclStmt.
Updated a few clients of DeclStmt::getNextDeclarator() to use decl_iterator instead.  Will update other clients after additional testing.

llvm-svn: 54368
2008-08-05 20:46:55 +00:00
Ted Kremenek c6501dbc10 Fix more strict-aliasing warnings.
Fix indentation of class declarations in ExprCXX.h

llvm-svn: 52380
2008-06-17 03:11:08 +00:00
Steve Naroff 021ca18bb5 - Move ObjC Expresssion AST's from Expr.h => ExprObjC.h
- #include ExprObjC.h in many places

llvm-svn: 51703
2008-05-29 21:12:08 +00:00
Eli Friedman 1f97e5798f Always initialize NEXT_CATCH; fixes a Valgrind uninitialized read error
(originally reported in PR1682).

llvm-svn: 51551
2008-05-25 04:34:57 +00:00
Ted Kremenek f025a8bc1c Fix potential double-free.
llvm-svn: 51381
2008-05-21 16:00:02 +00:00
Ted Kremenek 512d9412ec When destroying DeclStmts, also destroy the associated Decl (reclaim its memory).
llvm-svn: 51379
2008-05-21 15:53:55 +00:00
Ted Kremenek 40e489dfd8 Delete AST nodes, not just Decls.
llvm-svn: 51298
2008-05-20 04:10:52 +00:00
Ted Kremenek ce20e8fe8d Try to plug some memory leaks...
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
2008-05-20 00:43:19 +00:00
Ted Kremenek ee5794265a Added Stmt::DestroyChildren, which will be used by the dstors of the subclasses of Stmt to recursively delete their child AST nodes.
llvm-svn: 51278
2008-05-19 22:02:12 +00:00
Chris Lattner 7a51313d8a Make a major restructuring of the clang tree: introduce a top-level
lib dir and move all the libraries into it.  This follows the main
llvm tree, and allows the libraries to be built in parallel.  The
top level now enforces that all the libs are built before Driver,
but we don't care what order the libs are built in.  This speeds
up parallel builds, particularly incremental ones.

llvm-svn: 48402
2008-03-15 23:59:48 +00:00