diff options
Diffstat (limited to 'clang/unittests/Format/FormatTest.cpp')
| -rw-r--r-- | clang/unittests/Format/FormatTest.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/clang/unittests/Format/FormatTest.cpp b/clang/unittests/Format/FormatTest.cpp index 6aa7681ac59..d61dc7f662c 100644 --- a/clang/unittests/Format/FormatTest.cpp +++ b/clang/unittests/Format/FormatTest.cpp @@ -9866,6 +9866,15 @@ TEST_F(FormatTest, FormatsLambdas) { " return aaaaaaaaaaaaaaaaaaaaaaa != aaaaaaaaaaaaaaaaaaaaaaa;\n" "});", getLLVMStyleWithColumns(60)); + verifyFormat("SomeFunction({[&] {\n" + " // comment\n" + " },\n" + " [&] {\n" + " // comment\n" + " }});"); + verifyFormat("SomeFunction({[&] {\n" + " // comment\n" + "}});"); // Lambdas with return types. verifyFormat("int c = []() -> int { return 2; }();\n"); |

