Fixed #8884 (AST: handle xs... template argument)
This commit is contained in:
parent
1a6c3bb30e
commit
e0b64ec7a9
|
@ -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%"))
|
||||
|
|
|
@ -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<bool> { };"));
|
||||
ASSERT_EQUALS("AB: f( abc+=", testAst("struct A : public B<C*> { void f() { a=b+c; } };"));
|
||||
|
||||
ASSERT_EQUALS("xfts(=", testAst("; auto x = f(ts...);"));
|
||||
}
|
||||
|
||||
void astcast() {
|
||||
|
|
Loading…
Reference in New Issue