From 5891bae59e7147e5fe6e1913d55c95d50f398c6f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Marjam=C3=A4ki?= Date: Fri, 10 Oct 2014 19:05:31 +0200 Subject: [PATCH] AST: generilized handling of auto usage in new statement --- lib/tokenlist.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/tokenlist.cpp b/lib/tokenlist.cpp index 69304569f..71dfeab39 100644 --- a/lib/tokenlist.cpp +++ b/lib/tokenlist.cpp @@ -667,9 +667,9 @@ static void compilePrecedence3(Token *&tok, AST_state& state) tok = tok->link(); tok = tok->next(); } - if (Token::Match(tok, "( %type% ) (")) { + if (Token::Match(tok, "( const| %type% ) (")) { state.op.push(tok->next()); - tok = tok->tokAt(3); + tok = tok->link()->next(); compileBinOp(tok, state, compilePrecedence2); } else if (tok->str() == "[" || tok->str() == "(") compilePrecedence2(tok, state);