Before:
SomeFunction([](decltype(x), A * a) {});
After:
SomeFunction([](decltype(x), A *a) {});
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@207961
91177308-0d34-0410-b5e6-
96231b3b80d8
} else if (Current.isOneOf(tok::kw_return, tok::kw_throw)) {
Contexts.back().IsExpression = true;
} else if (Current.is(tok::l_paren) && !Line.MustBeDeclaration &&
- !Line.InPPDirective) {
+ !Line.InPPDirective && Current.Previous &&
+ Current.Previous->isNot(tok::kw_decltype)) {
bool ParametersOfFunctionType =
Current.Previous && Current.Previous->is(tok::r_paren) &&
Current.Previous->MatchingParen &&
verifyFormat("SomeFunction([]() { // A cool function...\n"
" return 43;\n"
"});");
+ verifyFormat("void f() {\n"
+ " SomeFunction([](decltype(x), A *a) {});\n"
+ "}");
// Lambdas with return types.
verifyFormat("int c = []() -> int { return 2; }();\n");