From a5621202c4445d101d6b295536e8ccec81dddb46 Mon Sep 17 00:00:00 2001 From: Daniel Jasper Date: Fri, 8 Aug 2014 12:00:13 +0000 Subject: 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 --- clang/unittests/Format/FormatTest.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'clang/unittests/Format/FormatTest.cpp') 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"); -- cgit v1.2.3