diff options
| author | Daniel Jasper <djasper@google.com> | 2014-11-21 14:08:38 +0000 |
|---|---|---|
| committer | Daniel Jasper <djasper@google.com> | 2014-11-21 14:08:38 +0000 |
| commit | bcb55eec3ac4857f250947bd757689a4f390463f (patch) | |
| tree | c9e2158c73a5f7c4121434a3472e95efe3f8029a /clang/unittests | |
| parent | d2b19bc867ee14c93e6ec72b28f25efb8ab8e179 (diff) | |
| download | bcm5719-llvm-bcb55eec3ac4857f250947bd757689a4f390463f.tar.gz bcm5719-llvm-bcb55eec3ac4857f250947bd757689a4f390463f.zip | |
clang-format: Understand more lambda return types.
Before:
auto a = [&b, c ](D * d) -> D * {}
After:
auto a = [&b, c](D* d) -> D* {}
llvm-svn: 222534
Diffstat (limited to 'clang/unittests')
| -rw-r--r-- | clang/unittests/Format/FormatTest.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/unittests/Format/FormatTest.cpp b/clang/unittests/Format/FormatTest.cpp index 479919e9cfe..fceebfadea7 100644 --- a/clang/unittests/Format/FormatTest.cpp +++ b/clang/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" |

