summaryrefslogtreecommitdiffstats
path: root/clang/unittests/Format/FormatTest.cpp
diff options
context:
space:
mode:
authorDaniel Jasper <djasper@google.com>2015-05-19 11:18:39 +0000
committerDaniel Jasper <djasper@google.com>2015-05-19 11:18:39 +0000
commitf5e5ee6d69d974b4f643a9f5291354b3a8850229 (patch)
tree949d3fd4d82bccaf225b0625b1585bef8bdcbc38 /clang/unittests/Format/FormatTest.cpp
parentd90d6fb53a38ca33b75adaedd5f93480336cb55a (diff)
downloadbcm5719-llvm-f5e5ee6d69d974b4f643a9f5291354b3a8850229.tar.gz
bcm5719-llvm-f5e5ee6d69d974b4f643a9f5291354b3a8850229.zip
clang-format: Correctly detect casts to qualified types.
Before: ns::E f() { return (ns::E) - 1; } After: ns::E f() { return (ns::E)-1; } This fixes llvm.org/PR23503. llvm-svn: 237684
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 3903ac31e83..9c3448ad83b 100644
--- a/clang/unittests/Format/FormatTest.cpp
+++ b/clang/unittests/Format/FormatTest.cpp
@@ -5765,6 +5765,7 @@ TEST_F(FormatTest, FormatsCasts) {
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;");
+ verifyFormat("my_int a = (ns::my_int)-2;");
// FIXME: single value wrapped with paren will be treated as cast.
verifyFormat("void f(int i = (kValue)*kMask) {}");
OpenPOWER on IntegriCloud