diff options
Diffstat (limited to 'lib/AST/Stmt.cpp')
-rw-r--r-- | lib/AST/Stmt.cpp | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/lib/AST/Stmt.cpp b/lib/AST/Stmt.cpp index fbb369f387..f30e105b17 100644 --- a/lib/AST/Stmt.cpp +++ b/lib/AST/Stmt.cpp @@ -55,7 +55,7 @@ void Stmt::Destroy(ASTContext& C) { } void DeclStmt::Destroy(ASTContext& C) { - TheDecl->Destroy(C); + DG.Destroy(C); delete this; } @@ -188,16 +188,12 @@ ObjCAtCatchStmt::ObjCAtCatchStmt(SourceLocation atCatchLoc, //===----------------------------------------------------------------------===// // DeclStmt -Stmt::child_iterator DeclStmt::child_begin() { return TheDecl; } -Stmt::child_iterator DeclStmt::child_end() { return child_iterator(); } - -DeclStmt::decl_iterator& DeclStmt::decl_iterator::operator++() { - D = D->getNextDeclarator(); - return *this; +Stmt::child_iterator DeclStmt::child_begin() { + return StmtIterator(DG.begin(), DG.end()); } -bool DeclStmt::hasSolitaryDecl() const { - return TheDecl->getNextDeclarator() == 0; +Stmt::child_iterator DeclStmt::child_end() { + return StmtIterator(DG.end(), DG.end()); } // NullStmt |