summaryrefslogtreecommitdiffstats
path: root/clang/unittests/Format/FormatTest.cpp
diff options
context:
space:
mode:
authorDaniel Jasper <djasper@google.com>2014-08-14 10:53:19 +0000
committerDaniel Jasper <djasper@google.com>2014-08-14 10:53:19 +0000
commit1904e9b98dca626166f99f62fa78fae30f6fa0f4 (patch)
tree7e3224face2bb09f583093d051be95a86ca05464 /clang/unittests/Format/FormatTest.cpp
parent78b4533acfd23a8944d0b5d3510e13b79a36805f (diff)
downloadbcm5719-llvm-1904e9b98dca626166f99f62fa78fae30f6fa0f4.tar.gz
bcm5719-llvm-1904e9b98dca626166f99f62fa78fae30f6fa0f4.zip
clang-format: Support chained dereferenced assignments.
Before: x = * a(x) = *a(y); After: x = *a(x) = *a(y); llvm-svn: 215632
Diffstat (limited to 'clang/unittests/Format/FormatTest.cpp')
-rw-r--r--clang/unittests/Format/FormatTest.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/clang/unittests/Format/FormatTest.cpp b/clang/unittests/Format/FormatTest.cpp
index a10b4d7fb62..c59201f6119 100644
--- a/clang/unittests/Format/FormatTest.cpp
+++ b/clang/unittests/Format/FormatTest.cpp
@@ -4823,6 +4823,10 @@ TEST_F(FormatTest, UnderstandsUsesOfStarAndAmp) {
"const char* const p = reinterpret_cast<const char* const>(q);");
verifyGoogleFormat("void f(int i = 0, SomeType** temps = NULL);");
+ FormatStyle Left = getLLVMStyle();
+ Left.PointerAlignment = FormatStyle::PAS_Left;
+ verifyFormat("x = *a(x) = *a(y);", Left);
+
verifyIndependentOfContext("a = *(x + y);");
verifyIndependentOfContext("a = &(x + y);");
verifyIndependentOfContext("*(x + y).call();");
OpenPOWER on IntegriCloud