summaryrefslogtreecommitdiffstats
path: root/include/clang/AST/StmtIterator.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/clang/AST/StmtIterator.h')
-rw-r--r--include/clang/AST/StmtIterator.h10
1 files changed, 4 insertions, 6 deletions
diff --git a/include/clang/AST/StmtIterator.h b/include/clang/AST/StmtIterator.h
index 05b50db..b933ed0 100644
--- a/include/clang/AST/StmtIterator.h
+++ b/include/clang/AST/StmtIterator.h
@@ -90,14 +90,12 @@ public:
StmtIteratorImpl(const VariableArrayType *t) : StmtIteratorBase(t) {}
DERIVED& operator++() {
- if (inDecl() || inDeclGroup()) {
- if (getVAPtr()) NextVA();
- else NextDecl();
- }
- else if (inSizeOfTypeVA())
+ if (inStmt())
+ ++stmt;
+ else if (getVAPtr())
NextVA();
else
- ++stmt;
+ NextDecl();
return static_cast<DERIVED&>(*this);
}
OpenPOWER on IntegriCloud