aboutsummaryrefslogtreecommitdiff
path: root/AST/StmtIterator.cpp
AgeCommit message (Collapse)Author
2008-03-15Make a major restructuring of the clang tree: introduce a top-levelChris Lattner
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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48402 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-29Don't attribute in file headers anymore. See llvmdev for theChris Lattner
discussion of this change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45410 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-14Added "mode" to StmtIterator to record if the expression being iteratedTed Kremenek
over is the subexpression of a sizeof(expression). Different clients will wish to handle iteration over such subexpressions differently, and can now easily query if they are iterating over such statements using the StmtIterator's inSizeOfExpr(). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45047 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-14Added support to StmtIterator to traverse the size expression of a VLA typeTed Kremenek
declared in a sizeof. For example: sizeof(int[foo()]); the expression "foo()" is an expression that is executed during the evaluation of sizeof. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45043 91177308-0d34-0410-b5e6-96231b3b80d8
2007-10-29Added support for StmtIterators to iterate over the size expressionsTed Kremenek
of VariableArrayTypes that appear in TypedefDecls. for example: typedef int T[x][x]; the StmtIterator will iterate over "x" and "x" as subexpressions of the DeclStmt for T. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43474 91177308-0d34-0410-b5e6-96231b3b80d8
2007-10-29Fixed deadcode bug where check for NULL decl occured within a blockTed Kremenek
where the decl would always be non-NULL. Moved the check to after the block to properly tidy up the iterator's state. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43473 91177308-0d34-0410-b5e6-96231b3b80d8
2007-10-29Modified StmtIterator to support iteration over the size expressionsTed Kremenek
of VariableTypeArray types that appear in DeclStmts. Removed operator-- from StmtIterator. operator-- added undesired complexity, and we have no consumers of it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43471 91177308-0d34-0410-b5e6-96231b3b80d8
2007-10-29Renamed internal variables of StmtIteratorBase to make the codeTed Kremenek
slightly more succinct. Introduced VariableArrayType* within StmtIteratorBase to (soon) support iteration over the size expressions of variable length arrays. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43455 91177308-0d34-0410-b5e6-96231b3b80d8
2007-10-25Disambiguated variable name to comply with VC++'s archaic variable scoping ↵Hartmut Kaiser
rules. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43371 91177308-0d34-0410-b5e6-96231b3b80d8
2007-10-25Modified StmtIterator to now include visiting the initialization expression ↵Ted Kremenek
for EnumConstantDecls. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43366 91177308-0d34-0410-b5e6-96231b3b80d8
2007-10-24Modified operator* for StmtIterator to return Stmt*& instead of Stmt*.Ted Kremenek
This permits in-place replacement of the original AST statements. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43295 91177308-0d34-0410-b5e6-96231b3b80d8
2007-10-18Fixed DeclStmt::child_begin() to actually create an iterator thatTed Kremenek
visits its decls, rather than just creating an "end()" iterator. Fixed child_end() for statements and expressions to use child_iterator() to create the end() iterator, rather than just returning NULL. Fixed bug in StmtIterator where we did not correctly detect if we had marched off the end of the ScopedDecls. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43156 91177308-0d34-0410-b5e6-96231b3b80d8
2007-10-18Refactored StmtIterator into classes StmtIteratorBase (non-templated)Ted Kremenek
and StmtIteratorImpl (templated), which StmtIterator and ConstStmtIterator now succintly subclass. Implemented iteration over the initializers in DeclStmts. This is not thoroughly tested, so there may be bugs. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43138 91177308-0d34-0410-b5e6-96231b3b80d8
2007-10-18Fixed broken build.Ted Kremenek
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43132 91177308-0d34-0410-b5e6-96231b3b80d8
2007-10-18Implemented 90% functionality of new child_iterator for Stmt objectsTed Kremenek
that will (soon) allow iteration over the initializers in declarations. This new iterator mechanism is implemented by the classes StmtIterator and ConstStmtIterator. Patched a few files to use "operator++" instead of "operator+" on child_iterators. Friendship added in VarDecl to StmtIterator to allow returning a reference to the initializer within the VarDecl. We may not wish this as a permanent solution. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43105 91177308-0d34-0410-b5e6-96231b3b80d8