summaryrefslogtreecommitdiffstats
path: root/clang/unittests/Format
diff options
context:
space:
mode:
authorDaniel Jasper <djasper@google.com>2015-10-07 01:41:22 +0000
committerDaniel Jasper <djasper@google.com>2015-10-07 01:41:22 +0000
commit4bc013e18c5d9d2d7de2cb9a8df48ffcde51cc9f (patch)
treea9504cc4dc8aed3ac140f6c75a3f8480ffa0edc6 /clang/unittests/Format
parent0ea4d799e3f196733f69712dfd83129dbd5fabd5 (diff)
downloadbcm5719-llvm-4bc013e18c5d9d2d7de2cb9a8df48ffcde51cc9f.tar.gz
bcm5719-llvm-4bc013e18c5d9d2d7de2cb9a8df48ffcde51cc9f.zip
clang-format: Understand array reference types.
Before: void f(Type(&parameter)[10]) {} void f(Type (*parameter)[10]) {} After: void f(Type (&parameter)[10]) {} void f(Type (*parameter)[10]) {} llvm-svn: 249502
Diffstat (limited to 'clang/unittests/Format')
-rw-r--r--clang/unittests/Format/FormatTest.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/clang/unittests/Format/FormatTest.cpp b/clang/unittests/Format/FormatTest.cpp
index 581b10baafd..6a265f3dd15 100644
--- a/clang/unittests/Format/FormatTest.cpp
+++ b/clang/unittests/Format/FormatTest.cpp
@@ -5423,6 +5423,7 @@ TEST_F(FormatTest, UnderstandsUsesOfStarAndAmp) {
verifyIndependentOfContext("return (int **&)a;");
verifyIndependentOfContext("f((*PointerToArray)[10]);");
verifyFormat("void f(Type (*parameter)[10]) {}");
+ verifyFormat("void f(Type (&parameter)[10]) {}");
verifyGoogleFormat("return sizeof(int**);");
verifyIndependentOfContext("Type **A = static_cast<Type **>(P);");
verifyGoogleFormat("Type** A = static_cast<Type**>(P);");
OpenPOWER on IntegriCloud