diff options
author | Ted Kremenek <kremenek@apple.com> | 2008-08-05 20:46:55 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2008-08-05 20:46:55 +0000 |
commit | 14f8b4ff660bcaa763974b8d0fae81857c594495 (patch) | |
tree | 5dd516f4f9247a549d7ac24580412b68767162e3 /lib/AST/Stmt.cpp | |
parent | 88bee7451399c04b7e1c49cdeb16fadf0dd66f58 (diff) |
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54368 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/Stmt.cpp')
-rw-r--r-- | lib/AST/Stmt.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/AST/Stmt.cpp b/lib/AST/Stmt.cpp index d3f3ff0e11..76538a8b18 100644 --- a/lib/AST/Stmt.cpp +++ b/lib/AST/Stmt.cpp @@ -193,6 +193,11 @@ ObjCAtCatchStmt::ObjCAtCatchStmt(SourceLocation atCatchLoc, Stmt::child_iterator DeclStmt::child_begin() { return getDecl(); } Stmt::child_iterator DeclStmt::child_end() { return child_iterator(); } +DeclStmt::decl_iterator& DeclStmt::decl_iterator::operator++() { + D = D->getNextDeclarator(); + return *this; +} + // NullStmt Stmt::child_iterator NullStmt::child_begin() { return child_iterator(); } Stmt::child_iterator NullStmt::child_end() { return child_iterator(); } |