diff options
Diffstat (limited to 'clang/unittests/Format/FormatTest.cpp')
| -rw-r--r-- | clang/unittests/Format/FormatTest.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/clang/unittests/Format/FormatTest.cpp b/clang/unittests/Format/FormatTest.cpp index b9310abbbea..b932b274d70 100644 --- a/clang/unittests/Format/FormatTest.cpp +++ b/clang/unittests/Format/FormatTest.cpp @@ -8171,6 +8171,16 @@ TEST_F(FormatTest, FormatsLambdas) { " return fffffffffffffffffffffffffffffffffffffff(i * j);\n" "};"); + // Multiple lambdas in the same parentheses change indentation rules. + verifyFormat("SomeFunction([]() {\n" + " int i = 42;\n" + " return i;\n" + " },\n" + " []() {\n" + " int j = 43;\n" + " return j;\n" + " });"); + // Not lambdas. verifyFormat("constexpr char hello[]{\"hello\"};"); verifyFormat("double &operator[](int i) { return 0; }\n" |

