From 21397a3232a12804a46f6e59fd83221a4409fbf1 Mon Sep 17 00:00:00 2001 From: Daniel Jasper Date: Wed, 9 Apr 2014 12:21:48 +0000 Subject: clang-format: Fix bug where clang-format would break the code. Before, it would turn: SomeFunction([]() { // Cool function.. return 43; }); Into this: SomeFunction([]() { // Cool function.. return 43; }); llvm-svn: 205849 --- 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 b932b274d70..5f44c5bb2b5 100644 --- a/clang/unittests/Format/FormatTest.cpp +++ b/clang/unittests/Format/FormatTest.cpp @@ -8161,6 +8161,9 @@ TEST_F(FormatTest, FormatsLambdas) { " x.end(), //\n" " [&](int, int) { return 1; });\n" "}\n"); + verifyFormat("SomeFunction([]() { // A cool function...\n" + " return 43;\n" + "});"); // Lambdas with return types. verifyFormat("int c = []() -> int { return 2; }();\n"); -- cgit v1.2.3