Fix "*" formatting when creating arrays of pointers.
Before: A = new int * [10]();
After: A = new int *[10]();
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173150 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/unittests/Format/FormatTest.cpp b/unittests/Format/FormatTest.cpp
index ba6d751..0c6385b 100644
--- a/unittests/Format/FormatTest.cpp
+++ b/unittests/Format/FormatTest.cpp
@@ -1338,6 +1338,9 @@
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) {