Improve understanding of unary operators.
Before: int x = ** a;
After: int x = **a;
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172619 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/unittests/Format/FormatTest.cpp b/unittests/Format/FormatTest.cpp
index 7d8ed14..6dd7cad 100644
--- a/unittests/Format/FormatTest.cpp
+++ b/unittests/Format/FormatTest.cpp
@@ -1167,6 +1167,11 @@
verifyGoogleFormat("A<int**, int**> a;");
verifyGoogleFormat("f(b ? *c : *d);");
verifyGoogleFormat("int a = b ? *c : *d;");
+ verifyGoogleFormat("Type* t = **x;");
+ verifyGoogleFormat("Type* t = *++*x;");
+ verifyGoogleFormat("*++*x;");
+ verifyGoogleFormat("Type* t = const_cast<T*>(&*x);");
+ verifyGoogleFormat("Type* t = x++ * y;");
verifyFormat("a = *(x + y);");
verifyFormat("a = &(x + y);");