diff options
author | Daniel Jasper <djasper@google.com> | 2014-12-08 13:22:37 +0000 |
---|---|---|
committer | Daniel Jasper <djasper@google.com> | 2014-12-08 13:22:37 +0000 |
commit | 3431b7506939e742197fe803f9db412061778f2f (patch) | |
tree | 661adcbc68df88cf309f38a4eefed2521f9abe68 /clang/unittests/Format/FormatTest.cpp | |
parent | 980385095ef8666ebccd72d46bc8f9c6ac95821a (diff) | |
download | bcm5719-llvm-3431b7506939e742197fe803f9db412061778f2f.tar.gz bcm5719-llvm-3431b7506939e742197fe803f9db412061778f2f.zip |
clang-format: Support commas in lambda return types.
Before:
auto next_pair = [](A * a) -> pair<A*, A*>{};
After:
auto next_pair = [](A* a) -> pair<A*, A*>{};
llvm-svn: 223652
Diffstat (limited to 'clang/unittests/Format/FormatTest.cpp')
-rw-r--r-- | clang/unittests/Format/FormatTest.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/clang/unittests/Format/FormatTest.cpp b/clang/unittests/Format/FormatTest.cpp index 8664711aa07..7ca7978fd19 100644 --- a/clang/unittests/Format/FormatTest.cpp +++ b/clang/unittests/Format/FormatTest.cpp @@ -9378,6 +9378,7 @@ TEST_F(FormatTest, FormatsLambdas) { 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) -> pair<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" |