diff options
| author | Daniel Jasper <djasper@google.com> | 2015-02-26 11:30:50 +0000 |
|---|---|---|
| committer | Daniel Jasper <djasper@google.com> | 2015-02-26 11:30:50 +0000 |
| commit | beaa322c36e3cc00652bac081f91feaad29b80f3 (patch) | |
| tree | ed9f509971097b5b86b0925cd4d2e371c79ce129 /clang/unittests/Format | |
| parent | a36842f8370192c60eda9da6739387ab6f8854b1 (diff) | |
| download | bcm5719-llvm-beaa322c36e3cc00652bac081f91feaad29b80f3.tar.gz bcm5719-llvm-beaa322c36e3cc00652bac081f91feaad29b80f3.zip | |
clang-format: Fix space of arrays of pointers to templated types.
Before:
vector<int>(*foo_)[6];
After:
vector<int> (*foo_)[6];
llvm-svn: 230625
Diffstat (limited to 'clang/unittests/Format')
| -rw-r--r-- | clang/unittests/Format/FormatTest.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/clang/unittests/Format/FormatTest.cpp b/clang/unittests/Format/FormatTest.cpp index 5bf4d3c7007..cc279699465 100644 --- a/clang/unittests/Format/FormatTest.cpp +++ b/clang/unittests/Format/FormatTest.cpp @@ -5606,6 +5606,11 @@ TEST_F(FormatTest, FormatsFunctionTypes) { verifyFormat("void f() { function(*some_pointer_var)[0] = 10; }"); } +TEST_F(FormatTest, FormatsPointersToArrayTypes) { + verifyFormat("A (*foo_)[6];"); + verifyFormat("vector<int> (*foo_)[6];"); +} + TEST_F(FormatTest, BreaksLongVariableDeclarations) { verifyFormat("LoooooooooooooooooooooooooooooooooooooooongType\n" " LoooooooooooooooooooooooooooooooooooooooongVariable;"); |

