From 484483bd5df3803088a9a1b7db473a7fe8e7bfaf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Marjam=C3=A4ki?= Date: Mon, 31 Mar 2014 17:16:13 +0200 Subject: [PATCH] AST: fixed ast for 'for (*x=0;y;z)' --- lib/tokenlist.cpp | 2 +- test/testtokenize.cpp | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/tokenlist.cpp b/lib/tokenlist.cpp index bf3197b8a..2335eb738 100644 --- a/lib/tokenlist.cpp +++ b/lib/tokenlist.cpp @@ -717,7 +717,7 @@ static Token * createAstAtToken(Token *tok) tok2 = tok2->link(); if (!tok2) break; - } else if (Token::Match(tok2, "%var% %op%|(|[|.|=|:|::") || Token::Match(tok2->previous(), "[;{}] %cop%|(")) { + } else if (Token::Match(tok2, "%var% %op%|(|[|.|=|:|::") || Token::Match(tok2->previous(), "[(;{}] %cop%|(")) { init1 = tok2; std::stack operands; compileExpression(tok2, operands); diff --git a/test/testtokenize.cpp b/test/testtokenize.cpp index 2ddb23540..4c1653bb0 100644 --- a/test/testtokenize.cpp +++ b/test/testtokenize.cpp @@ -10291,6 +10291,7 @@ private: TODO_ASSERT_EQUALS("fori1=current0=,iNUM<=i++;;(", "fori1=current0=,i