diff --git a/lib/tokenlist.cpp b/lib/tokenlist.cpp index a712458d2..669a1258a 100644 --- a/lib/tokenlist.cpp +++ b/lib/tokenlist.cpp @@ -591,6 +591,8 @@ static void compileTerm(Token *&tok, AST_state& state) state.op.push(tok); if (Token::Match(tok, "%name% <") && tok->linkAt(1)) tok = tok->linkAt(1); + else if (Token::Match(tok, "%name% . . .")) + tok = tok->tokAt(3); tok = tok->next(); if (Token::Match(tok, "%str%")) { while (Token::Match(tok, "%name%|%str%")) diff --git a/test/testtokenize.cpp b/test/testtokenize.cpp index 34dcf27e9..36d9dc421 100644 --- a/test/testtokenize.cpp +++ b/test/testtokenize.cpp @@ -8546,6 +8546,8 @@ private: // This two unit tests were added to avoid a crash. The actual correct AST result for non-executable code has not been determined so far. ASSERT_EQUALS("Cpublica::b:::", testAst("class C : public ::a::b { };")); ASSERT_EQUALS("AB: f( abc+=", testAst("struct A : public B { void f() { a=b+c; } };")); + + ASSERT_EQUALS("xfts(=", testAst("; auto x = f(ts...);")); } void astcast() {