summaryrefslogtreecommitdiffstats
path: root/unittests
diff options
context:
space:
mode:
authorDaniel Jasper <djasper@google.com>2014-11-21 14:08:38 +0000
committerDaniel Jasper <djasper@google.com>2014-11-21 14:08:38 +0000
commitb643cf9daa35f3540a4420d93d7cc6f48cffb735 (patch)
tree9a2a1902c75c48b73f4b0e4197e29e062fe8cb6d /unittests
parent8228889b01404d7e59270b1f97a83977531a7748 (diff)
clang-format: Understand more lambda return types.
Before: auto a = [&b, c ](D * d) -> D * {} After: auto a = [&b, c](D* d) -> D* {} git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@222534 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'unittests')
-rw-r--r--unittests/Format/FormatTest.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/unittests/Format/FormatTest.cpp b/unittests/Format/FormatTest.cpp
index 479919e9cf..fceebfadea 100644
--- a/unittests/Format/FormatTest.cpp
+++ b/unittests/Format/FormatTest.cpp
@@ -9279,6 +9279,9 @@ TEST_F(FormatTest, FormatsLambdas) {
verifyFormat("int c = []() -> int { return 2; }();\n");
verifyFormat("int c = []() -> vector<int> { return {2}; }();\n");
verifyFormat("Foo([]() -> std::vector<int> { return {2}; }());");
+ verifyGoogleFormat("auto a = [&b, c](D* d) -> D* {};");
+ verifyGoogleFormat("auto a = [&b, c](D* d) -> D& {};");
+ verifyGoogleFormat("auto a = [&b, c](D* d) -> const D* {};");
verifyFormat("auto aaaaaaaa = [](int i, // break for some reason\n"
" int j) -> int {\n"
" return ffffffffffffffffffffffffffffffffffffffffffff(i * j);\n"