diff options
author | Daniel Jasper <djasper@google.com> | 2013-01-22 11:46:26 +0000 |
---|---|---|
committer | Daniel Jasper <djasper@google.com> | 2013-01-22 11:46:26 +0000 |
commit | 0b8206029ba79c78022881130ccb69862eaf60f2 (patch) | |
tree | a2d96a6519ed1a68e26ddd3df9251f878774ac84 /clang/unittests/Format/FormatTest.cpp | |
parent | 81f0b331dc977f78284cc98071c863565c04c472 (diff) | |
download | bcm5719-llvm-0b8206029ba79c78022881130ccb69862eaf60f2.tar.gz bcm5719-llvm-0b8206029ba79c78022881130ccb69862eaf60f2.zip |
Fix "*" formatting when creating arrays of pointers.
Before: A = new int * [10]();
After: A = new int *[10]();
llvm-svn: 173150
Diffstat (limited to 'clang/unittests/Format/FormatTest.cpp')
-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 ba6d7519c6c..0c6385b7a16 100644 --- a/clang/unittests/Format/FormatTest.cpp +++ b/clang/unittests/Format/FormatTest.cpp @@ -1338,6 +1338,9 @@ TEST_F(FormatTest, UnderstandsUsesOfStarAndAmp) { verifyFormat("if (*b[i])"); verifyFormat("if (int *a = (&b))"); verifyFormat("while (int *a = &b)"); + + verifyFormat("A = new SomeType *[Length]();"); + verifyGoogleFormat("A = new SomeType* [Length]();"); } TEST_F(FormatTest, FormatsCasts) { |