From: Manuel Klimek Date: Mon, 14 Jan 2013 10:58:01 +0000 (+0000) Subject: Adds some more tests for * and &. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1b6f4bd8d7e75e775053b1cb1281c6a127746e93;p=clang Adds some more tests for * and &. While reviewing r172303 I noticed that I wasn't sure whether we still format those correctly and didn't see any tests. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172396 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/unittests/Format/FormatTest.cpp b/unittests/Format/FormatTest.cpp index b05d19c652..2f66e5454c 100644 --- a/unittests/Format/FormatTest.cpp +++ b/unittests/Format/FormatTest.cpp @@ -1074,6 +1074,12 @@ TEST_F(FormatTest, UnderstandsUsesOfStarAndAmp) { verifyGoogleFormat("A a;"); verifyGoogleFormat("f(b ? *c : *d);"); verifyGoogleFormat("int a = b ? *c : *d;"); + + verifyFormat("a = *(x + y);"); + verifyFormat("a = &(x + y);"); + verifyFormat("*(x + y).call();"); + verifyFormat("&(x + y)->call();"); + verifyFormat("&(*I).first"); } TEST_F(FormatTest, FormatsCasts) {