summaryrefslogtreecommitdiffstats
path: root/clang/unittests/Format/FormatTest.cpp
diff options
context:
space:
mode:
authorDaniel Jasper <djasper@google.com>2014-08-25 09:36:07 +0000
committerDaniel Jasper <djasper@google.com>2014-08-25 09:36:07 +0000
commit4b3ba214d06d5681894d1f481a7bb1f5cc6a597e (patch)
tree62f23ca7f7d30a88029cf5dd64cbb4f4380849ea /clang/unittests/Format/FormatTest.cpp
parent7189fb2cf9c4aed01b0061756615ae5c0041d044 (diff)
downloadbcm5719-llvm-4b3ba214d06d5681894d1f481a7bb1f5cc6a597e.tar.gz
bcm5719-llvm-4b3ba214d06d5681894d1f481a7bb1f5cc6a597e.zip
clang-format: Understand sequenced casts.
This fixed llvm.org/PR20712. Before: int i = (int)(int) -2; After: int i = (int)(int)-2; llvm-svn: 216378
Diffstat (limited to 'clang/unittests/Format/FormatTest.cpp')
-rw-r--r--clang/unittests/Format/FormatTest.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/clang/unittests/Format/FormatTest.cpp b/clang/unittests/Format/FormatTest.cpp
index 70b02ebc801..14c221bad95 100644
--- a/clang/unittests/Format/FormatTest.cpp
+++ b/clang/unittests/Format/FormatTest.cpp
@@ -5057,6 +5057,7 @@ TEST_F(FormatTest, FormatsCasts) {
verifyFormat("my_int a = (my_int *)1;");
verifyFormat("my_int a = (const my_int)-1;");
verifyFormat("my_int a = (const my_int *)-1;");
+ verifyFormat("my_int a = (my_int)(my_int)-1;");
// FIXME: single value wrapped with paren will be treated as cast.
verifyFormat("void f(int i = (kValue)*kMask) {}");
OpenPOWER on IntegriCloud