clang-format: Improve format of lambdas in ctor initializers.
Before:
Constructor()
: Constructor([] { // comment
int i;
}) {}
After:
Constructor()
: Constructor([] { // comment
int i;
}) {}
llvm-svn: 225625
diff --git a/clang/unittests/Format/FormatTest.cpp b/clang/unittests/Format/FormatTest.cpp
index a49a35c1..3bb5540 100644
--- a/clang/unittests/Format/FormatTest.cpp
+++ b/clang/unittests/Format/FormatTest.cpp
@@ -9380,6 +9380,10 @@
verifyFormat("string abc = SomeFunction(aaaaaaaaaaaaa, aaaaa, []() {\n"
" SomeOtherFunctioooooooooooooooooooooooooon();\n"
"});");
+ verifyFormat("Constructor()\n"
+ " : Field([] { // comment\n"
+ " int i;\n"
+ " }) {}");
// Lambdas with return types.
verifyFormat("int c = []() -> int { return 2; }();\n");