diff options
Diffstat (limited to 'clang/unittests/Format/FormatTest.cpp')
-rw-r--r-- | clang/unittests/Format/FormatTest.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/clang/unittests/Format/FormatTest.cpp b/clang/unittests/Format/FormatTest.cpp index 7d8ed14191f..6dd7cad1380 100644 --- a/clang/unittests/Format/FormatTest.cpp +++ b/clang/unittests/Format/FormatTest.cpp @@ -1167,6 +1167,11 @@ TEST_F(FormatTest, UnderstandsUsesOfStarAndAmp) { 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);"); |