aboutsummaryrefslogtreecommitdiff
path: root/unittests/Format/FormatTest.cpp
diff options
context:
space:
mode:
authorDaniel Jasper <djasper@google.com>2013-01-02 15:46:59 +0000
committerDaniel Jasper <djasper@google.com>2013-01-02 15:46:59 +0000
commitef5b9c3d38a1f6d0921591cb2749e529a8cc4a2e (patch)
tree6df00a7270552366135c9e304f8ad8553c8c5642 /unittests/Format/FormatTest.cpp
parent1f0754bf761f7d4910348ce3aba867d34473bceb (diff)
Correctly format pointers and references in casts.
This fixes llvm.org/PR14747. Before: Type *A = (Type * ) P; After: Type *A = (Type *) P; git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171390 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'unittests/Format/FormatTest.cpp')
-rw-r--r--unittests/Format/FormatTest.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/unittests/Format/FormatTest.cpp b/unittests/Format/FormatTest.cpp
index 22da93ebe3..b52a9fd7c3 100644
--- a/unittests/Format/FormatTest.cpp
+++ b/unittests/Format/FormatTest.cpp
@@ -699,6 +699,9 @@ TEST_F(FormatTest, UnderstandsUsesOfStarAndAmp) {
verifyFormat("A<int **> a;");
verifyFormat("A<int *, int *> a;");
verifyFormat("A<int **, int **> a;");
+ verifyFormat("Type *A = static_cast<Type *>(P);");
+ verifyFormat("Type *A = (Type *) P;");
+ verifyFormat("Type *A = (vector<Type *, int *>) P;");
verifyGoogleFormat("int main(int argc, char** argv) {\n}");
verifyGoogleFormat("A<int*> a;");