From: Benjamin Kramer Date: Mon, 26 Mar 2012 20:12:15 +0000 (+0000) Subject: Simplify code, no functionality change. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=165ce3c8a16542182adedae6475ed08ae4972e31;p=clang Simplify code, no functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153459 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/clang/AST/StmtIterator.h b/include/clang/AST/StmtIterator.h index 05b50db7de..b933ed0762 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(*this); }