diff options
author | Daniel Jasper <djasper@google.com> | 2013-10-20 18:15:30 +0000 |
---|---|---|
committer | Daniel Jasper <djasper@google.com> | 2013-10-20 18:15:30 +0000 |
commit | 363193b1bd4d9e0f07d361113157b9d4f229f212 (patch) | |
tree | b0ce952824fc5a28e2ca6ab13775286f8d5594b6 /unittests | |
parent | 15eef85d4f918834ab83cfb941663463b573d6bf (diff) | |
download | clang-363193b1bd4d9e0f07d361113157b9d4f229f212.tar.gz |
clang-format: Better understand Lambda poarameters.
Before:
auto PointerBinding = [](const char * S) {};
After:
auto PointerBinding = [](const char *S) {};
This fixes llvm.org/PR17618.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193054 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'unittests')
-rw-r--r-- | unittests/Format/FormatTest.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/unittests/Format/FormatTest.cpp b/unittests/Format/FormatTest.cpp index 16471b754a..6a2d0d89b4 100644 --- a/unittests/Format/FormatTest.cpp +++ b/unittests/Format/FormatTest.cpp @@ -3933,6 +3933,7 @@ TEST_F(FormatTest, UnderstandsUsesOfStarAndAmp) { verifyIndependentOfContext("Type **A = static_cast<Type **>(P);"); verifyGoogleFormat("Type** A = static_cast<Type**>(P);"); verifyFormat("auto a = [](int **&, int ***) {};"); + verifyFormat("auto PointerBinding = [](const char *S) {};"); verifyFormat("typedef typeof(int(int, int)) *MyFunc;"); verifyIndependentOfContext("InvalidRegions[*R] = 0;"); |