diff options
| author | Daniel Jasper <djasper@google.com> | 2014-08-08 12:00:13 +0000 |
|---|---|---|
| committer | Daniel Jasper <djasper@google.com> | 2014-08-08 12:00:13 +0000 |
| commit | a5621202c4445d101d6b295536e8ccec81dddb46 (patch) | |
| tree | 4503c24c2bc64c6bc147218f8d48d2cae27a1602 /clang/unittests/Format/FormatTest.cpp | |
| parent | b911bf84dc9a3ff566a50945bb59df4bd3020572 (diff) | |
| download | bcm5719-llvm-a5621202c4445d101d6b295536e8ccec81dddb46.tar.gz bcm5719-llvm-a5621202c4445d101d6b295536e8ccec81dddb46.zip | |
clang-format: Prefer not to put lambdas on a single line.
Before:
string abc =
SomeFunction(aaaaaaaaaaaaa, aaaaa,
[]() { SomeOtherFunctioooooooooooooooooooooooooon(); });
After:
string abc = SomeFunction(aaaaaaaaaaaaa, aaaaa, []() {
SomeOtherFunctioooooooooooooooooooooooooon();
});
llvm-svn: 215197
Diffstat (limited to 'clang/unittests/Format/FormatTest.cpp')
| -rw-r--r-- | clang/unittests/Format/FormatTest.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/unittests/Format/FormatTest.cpp b/clang/unittests/Format/FormatTest.cpp index bd55c9ef219..a171066fa37 100644 --- a/clang/unittests/Format/FormatTest.cpp +++ b/clang/unittests/Format/FormatTest.cpp @@ -8819,6 +8819,9 @@ TEST_F(FormatTest, FormatsLambdas) { "}"); verifyFormat("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa(\n" " [](const aaaaaaaaaa &a) { return a; });"); + verifyFormat("string abc = SomeFunction(aaaaaaaaaaaaa, aaaaa, []() {\n" + " SomeOtherFunctioooooooooooooooooooooooooon();\n" + "});"); // Lambdas with return types. verifyFormat("int c = []() -> int { return 2; }();\n"); |

