diff options
author | Daniel Jasper <djasper@google.com> | 2014-10-27 16:31:46 +0000 |
---|---|---|
committer | Daniel Jasper <djasper@google.com> | 2014-10-27 16:31:46 +0000 |
commit | 56346193894e1afb3b4705fc9526933e11ed4aec (patch) | |
tree | f6f74cbb66ca02702ef513e941a1cd64d36b92cd /clang/unittests/Format/FormatTest.cpp | |
parent | 44ed3d04bfdec42f745c73a9a55f5c94886ac1c6 (diff) | |
download | bcm5719-llvm-56346193894e1afb3b4705fc9526933e11ed4aec.tar.gz bcm5719-llvm-56346193894e1afb3b4705fc9526933e11ed4aec.zip |
clang-format: Fix bad merging of lines in nested blocks.
Before:
SomeFunction([]() {
#define A a
return 43; });
After:
SomeFunction([]() {
#define A a
return 43;
});
llvm-svn: 220684
Diffstat (limited to 'clang/unittests/Format/FormatTest.cpp')
-rw-r--r-- | clang/unittests/Format/FormatTest.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/clang/unittests/Format/FormatTest.cpp b/clang/unittests/Format/FormatTest.cpp index 5642b0f9e65..f29aff8f0e9 100644 --- a/clang/unittests/Format/FormatTest.cpp +++ b/clang/unittests/Format/FormatTest.cpp @@ -9103,6 +9103,14 @@ TEST_F(FormatTest, FormatsLambdas) { verifyFormat("SomeFunction([]() { // A cool function...\n" " return 43;\n" "});"); + EXPECT_EQ("SomeFunction([]() {\n" + "#define A a\n" + " return 43;\n" + "});", + format("SomeFunction([](){\n" + "#define A a\n" + "return 43;\n" + "});")); verifyFormat("void f() {\n" " SomeFunction([](decltype(x), A *a) {});\n" "}"); |