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
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
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
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
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
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
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
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
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