File tree Expand file tree Collapse file tree 2 files changed +2
-1
lines changed Expand file tree Collapse file tree 2 files changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -1447,7 +1447,7 @@ const Token* findLambdaEndTokenWithoutAST(const Token* tok) {
14471447 tok = tok->link ()->next ();
14481448 if (Token::simpleMatch (tok, " mutable" ))
14491449 tok = tok->next ();
1450- if (Token::simpleMatch (tok, " ." )) { // trailing return type
1450+ if (Token::Match (tok, " .|-> " )) { // trailing return type
14511451 tok = tok->next ();
14521452 while (Token::Match (tok, " %type%|%name%|::|&|&&|*|<|(" )) {
14531453 if (tok->link ())
Original file line number Diff line number Diff line change @@ -1764,6 +1764,7 @@ class TestGarbage : public TestFixture {
17641764 }
17651765 void garbageCode228 () {
17661766 ASSERT_NO_THROW (checkCode (" void f() { enum { A = [=]() mutable { return 0; }() }; }" ));
1767+ ASSERT_NO_THROW (checkCode (" enum { A = [=](void) mutable -> int { return 0; }() };" ));
17671768 }
17681769
17691770 void syntaxErrorFirstToken () {
You can’t perform that action at this time.
0 commit comments