summaryrefslogtreecommitdiffstats
path: root/clang/unittests/Format/FormatTest.cpp
diff options
context:
space:
mode:
authorDaniel Jasper <djasper@google.com>2014-06-24 09:15:49 +0000
committerDaniel Jasper <djasper@google.com>2014-06-24 09:15:49 +0000
commita2fb50f9b3eefae4146d001365a29d4a86c41fbe (patch)
treed2af83f3e6fdf58fcc0d55a5746ce017c0e14d22 /clang/unittests/Format/FormatTest.cpp
parentad8065f01a900cd6663e10f8fd857a0aba934bf8 (diff)
downloadbcm5719-llvm-a2fb50f9b3eefae4146d001365a29d4a86c41fbe.tar.gz
bcm5719-llvm-a2fb50f9b3eefae4146d001365a29d4a86c41fbe.zip
clang-format: Understand that breaking before lambdas is fine.
Before: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa([]( const aaaaaaaaaa &a) { return a; }); After: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa( [](const aaaaaaaaaa &a) { return a; }); llvm-svn: 211575
Diffstat (limited to 'clang/unittests/Format/FormatTest.cpp')
-rw-r--r--clang/unittests/Format/FormatTest.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/clang/unittests/Format/FormatTest.cpp b/clang/unittests/Format/FormatTest.cpp
index 968e13b3feb..11a42a51faf 100644
--- a/clang/unittests/Format/FormatTest.cpp
+++ b/clang/unittests/Format/FormatTest.cpp
@@ -8721,6 +8721,8 @@ TEST_F(FormatTest, FormatsLambdas) {
verifyFormat("void f() {\n"
" SomeFunction([](decltype(x), A *a) {});\n"
"}");
+ verifyFormat("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa(\n"
+ " [](const aaaaaaaaaa &a) { return a; });");
// Lambdas with return types.
verifyFormat("int c = []() -> int { return 2; }();\n");
@@ -8728,7 +8730,7 @@ TEST_F(FormatTest, FormatsLambdas) {
verifyFormat("Foo([]() -> std::vector<int> { return {2}; }());");
verifyFormat("auto aaaaaaaa = [](int i, // break for some reason\n"
" int j) -> int {\n"
- " return fffffffffffffffffffffffffffffffffffffff(i * j);\n"
+ " return ffffffffffffffffffffffffffffffffffffffffffff(i * j);\n"
"};");
// Multiple lambdas in the same parentheses change indentation rules.
OpenPOWER on IntegriCloud