parent
8672e12a7a
commit
6df8573e15
|
@ -626,7 +626,8 @@ static bool iscpp11init_impl(const Token * const tok)
|
|||
}
|
||||
if (!nameToken)
|
||||
return false;
|
||||
if (nameToken->str() == ")" && Token::simpleMatch(nameToken->link()->previous(), "decltype ("))
|
||||
if (nameToken->str() == ")" && Token::simpleMatch(nameToken->link()->previous(), "decltype (") &&
|
||||
!Token::simpleMatch(nameToken->link()->tokAt(-2), "."))
|
||||
return true;
|
||||
if (Token::simpleMatch(nameToken, ", {"))
|
||||
return true;
|
||||
|
|
|
@ -6377,6 +6377,12 @@ private:
|
|||
ASSERT_EQUALS("AB: abc+=", testAst("struct A : public B<C*> { void f() { a=b+c; } };"));
|
||||
|
||||
ASSERT_EQUALS("xfts(=", testAst("; auto x = f(ts...);"));
|
||||
|
||||
// #11369
|
||||
ASSERT_NO_THROW(tokenizeAndStringify("int a;\n"
|
||||
"template <class> auto b() -> decltype(a) {\n"
|
||||
" if (a) {}\n"
|
||||
"}\n"));
|
||||
}
|
||||
|
||||
void astcast() {
|
||||
|
|
Loading…
Reference in New Issue