diff options
author | Daniel Jasper <djasper@google.com> | 2013-03-13 07:49:51 +0000 |
---|---|---|
committer | Daniel Jasper <djasper@google.com> | 2013-03-13 07:49:51 +0000 |
commit | 6f21a988990ff5872822dcb049bd8fc65ce3d236 (patch) | |
tree | 3674fc64cc6a90272d87924bc2a096dcfb35f132 /unittests/Format/FormatTest.cpp | |
parent | e0d5c86687c4a449f5104306108aa365b20ba09d (diff) |
Fix formatting of new arrays of pointers.
Before:
A = new SomeType * [Length];
A = new SomeType *[Length]();
After:
A = new SomeType *[Length];
A = new SomeType *[Length]();
Small formatting cleanups with clang-format.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176936 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'unittests/Format/FormatTest.cpp')
-rw-r--r-- | unittests/Format/FormatTest.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/unittests/Format/FormatTest.cpp b/unittests/Format/FormatTest.cpp index 5cab6f96f3..fed50f9681 100644 --- a/unittests/Format/FormatTest.cpp +++ b/unittests/Format/FormatTest.cpp @@ -1949,8 +1949,10 @@ TEST_F(FormatTest, UnderstandsUsesOfStarAndAmp) { verifyFormat("for (int i = a * a; i < 10; ++i) {\n}"); verifyFormat("for (int i = 0; i < a * a; ++i) {\n}"); + verifyIndependentOfContext("A = new SomeType *[Length];"); verifyIndependentOfContext("A = new SomeType *[Length]();"); verifyGoogleFormat("A = new SomeType* [Length]();"); + verifyGoogleFormat("A = new SomeType* [Length];"); } TEST_F(FormatTest, AdaptivelyFormatsPointersAndReferences) { |