diff --git a/lib/tokenlist.cpp b/lib/tokenlist.cpp index 5cf01abd9..3dcc84c1f 100644 --- a/lib/tokenlist.cpp +++ b/lib/tokenlist.cpp @@ -1066,7 +1066,8 @@ static void createAstAtTokenInner(Token * const tok1, const Token *endToken, boo } } -static Token * findAstTop(Token *tok1, Token *tok2) { +static Token * findAstTop(Token *tok1, Token *tok2) +{ for (Token *tok = tok1; tok && (tok != tok2); tok = tok->next()) { if (tok->astParent() || tok->astOperand1() || tok->astOperand2()) return const_cast(tok->astTop());