initializers.
Before:
Constructor() : member([](A *a, B * b) {}) {}
After:
Constructor() : member([](A *a, B *b) {}) {}
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@259353
91177308-0d34-0410-b5e6-
96231b3b80d8
Previous && Previous->isOneOf(tok::star, tok::amp);
Previous = Previous->Previous)
Previous->Type = TT_PointerOrReference;
- if (Line.MustBeDeclaration)
- Contexts.back().IsExpression = Contexts.front().InCtorInitializer;
+ if (Line.MustBeDeclaration && !Contexts.front().InCtorInitializer)
+ Contexts.back().IsExpression = false;
} else if (Current.Previous &&
Current.Previous->is(TT_CtorInitializerColon)) {
Contexts.back().IsExpression = true;
verifyFormat("[](const decltype(*a) &value) {}");
verifyFormat("decltype(a * b) F();");
verifyFormat("#define MACRO() [](A *a) { return 1; }");
+ verifyFormat("Constructor() : member([](A *a, B *b) {}) {}");
verifyIndependentOfContext("typedef void (*f)(int *a);");
verifyIndependentOfContext("int i{a * b};");
verifyIndependentOfContext("aaa && aaa->f();");