Before:
[](const decltype(*a) & value) {}
After:
[](const decltype(*a)& value) {}
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@210643
91177308-0d34-0410-b5e6-
96231b3b80d8
if (PrevToken->is(tok::r_paren) && PrevToken->MatchingParen &&
PrevToken->MatchingParen->Previous &&
- PrevToken->MatchingParen->Previous->is(tok::kw_typeof))
+ PrevToken->MatchingParen->Previous->isOneOf(tok::kw_typeof,
+ tok::kw_decltype))
return TT_PointerOrReference;
if (PrevToken->Tok.isLiteral() ||
verifyFormat("auto a = [](int **&, int ***) {};");
verifyFormat("auto PointerBinding = [](const char *S) {};");
verifyFormat("typedef typeof(int(int, int)) *MyFunc;");
+ verifyFormat("[](const decltype(*a) &value) {}");
verifyIndependentOfContext("typedef void (*f)(int *a);");
verifyIndependentOfContext("int i{a * b};");
verifyIndependentOfContext("aaa && aaa->f();");