AST: Fixed AST for lambda that returns template type
This commit is contained in:
parent
02e7f4f61c
commit
277c59e5f3
|
@ -804,6 +804,8 @@ static void compilePrecedence2(Token *&tok, AST_state& state)
|
|||
if (curlyBracket && curlyBracket->originalName() == "->") {
|
||||
while (Token::Match(curlyBracket, "%name%|.|::|&|*"))
|
||||
curlyBracket = curlyBracket->next();
|
||||
if (curlyBracket && curlyBracket->str() == "<" && curlyBracket->link())
|
||||
curlyBracket = curlyBracket->link()->next();
|
||||
}
|
||||
if (curlyBracket && curlyBracket->str() == "{") {
|
||||
squareBracket->astOperand1(roundBracket);
|
||||
|
|
|
@ -7620,6 +7620,12 @@ private:
|
|||
" a=b;\n"
|
||||
" }\n"
|
||||
"}"));
|
||||
|
||||
// daca@home hang
|
||||
ASSERT_EQUALS("a{([= 0return b{([= fori0=i10!=i++;;(",
|
||||
testAst("a = [&]() -> std::pair<int, int> { return 0; };\n"
|
||||
"b = [=]() { for (i = 0; i != 10; ++i); };"));
|
||||
|
||||
}
|
||||
|
||||
void astcase() {
|
||||
|
|
Loading…
Reference in New Issue