summaryrefslogtreecommitdiffstats
path: root/clang/unittests/Format/FormatTest.cpp
diff options
context:
space:
mode:
authorDaniel Jasper <djasper@google.com>2016-04-05 11:46:06 +0000
committerDaniel Jasper <djasper@google.com>2016-04-05 11:46:06 +0000
commit94b1bdf91a6565dd7e6a51343fcb5fbdf25f1725 (patch)
treebb126539dde39b4d735cefb25cb8575a84d5aa79 /clang/unittests/Format/FormatTest.cpp
parentc253f8b06be7d8fe23cb08613fad439c01d51521 (diff)
downloadbcm5719-llvm-94b1bdf91a6565dd7e6a51343fcb5fbdf25f1725.tar.gz
bcm5719-llvm-94b1bdf91a6565dd7e6a51343fcb5fbdf25f1725.zip
clang-format: Fix cast detection on "this".
Before: auto x = (X) this; After: auto x = (X)this; This fixes llvm.org/PR27198. llvm-svn: 265385
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 8f63cbe3232..1107718348a 100644
--- a/clang/unittests/Format/FormatTest.cpp
+++ b/clang/unittests/Format/FormatTest.cpp
@@ -5984,6 +5984,7 @@ TEST_F(FormatTest, FormatsCasts) {
verifyFormat("my_int a = (my_int)(my_int)-1;");
verifyFormat("my_int a = (ns::my_int)-2;");
verifyFormat("case (my_int)ONE:");
+ verifyFormat("auto x = (X)this;");
// FIXME: single value wrapped with paren will be treated as cast.
verifyFormat("void f(int i = (kValue)*kMask) {}");
OpenPOWER on IntegriCloud