From 7663b6ee755c7f6eb25d430c4163288314793ee4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Marjam=C3=A4ki?= Date: Mon, 25 Jan 2016 10:29:24 +0100 Subject: [PATCH] Fixed #7348 (AST: wrong ast for cast that starts with :: '(::X*)x;') --- 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 ed0fd0c2b..4e82da01e 100644 --- a/lib/tokenlist.cpp +++ b/lib/tokenlist.cpp @@ -440,7 +440,7 @@ struct AST_state { static bool iscast(const Token *tok) { - if (!Token::Match(tok, "( %name%")) + if (!Token::Match(tok, "( ::| %name%")) return false; if (tok->previous() && tok->previous()->isName() && tok->previous()->str() != "return") diff --git a/test/testtokenize.cpp b/test/testtokenize.cpp index aab65e355..ad085c495 100644 --- a/test/testtokenize.cpp +++ b/test/testtokenize.cpp @@ -8300,6 +8300,7 @@ private: ASSERT_EQUALS("c(40<