diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/AST/Stmt.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/AST/Stmt.cpp b/lib/AST/Stmt.cpp index 586e8f986a..74ed6e92c6 100644 --- a/lib/AST/Stmt.cpp +++ b/lib/AST/Stmt.cpp @@ -43,8 +43,9 @@ const char *Stmt::getStmtClassName() const { } void Stmt::DestroyChildren(ASTContext& C) { - for (child_iterator I = child_begin(), E = child_end(); I !=E; ++I) - if (Stmt* Child = *I) Child->Destroy(C); + for (child_iterator I = child_begin(), E = child_end(); I !=E; ) { + if (Stmt* Child = *I++) Child->Destroy(C); + } } void Stmt::Destroy(ASTContext& C) { |