summaryrefslogtreecommitdiffstats
path: root/clang/unittests/Format/FormatTest.cpp
diff options
context:
space:
mode:
authorDaniel Jasper <djasper@google.com>2014-04-14 12:50:02 +0000
committerDaniel Jasper <djasper@google.com>2014-04-14 12:50:02 +0000
commit72ab43b28b09401d48dfbcf8c79cdc7ea6fb44b5 (patch)
tree9e530a2139ede1f22cd636cbf50bb31ddf76ae9d /clang/unittests/Format/FormatTest.cpp
parent84aa310c82565b0f467250ec84917dc402608b0e (diff)
downloadbcm5719-llvm-72ab43b28b09401d48dfbcf8c79cdc7ea6fb44b5.tar.gz
bcm5719-llvm-72ab43b28b09401d48dfbcf8c79cdc7ea6fb44b5.zip
clang-format: Fix incorrect &&-detection in macros.
Before: #define A(a, b) (a &&b) After: #define A(a, b) (a && b) This fixes llvm.org/PR19343. llvm-svn: 206165
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 f829dccbe98..a98e3d55556 100644
--- a/clang/unittests/Format/FormatTest.cpp
+++ b/clang/unittests/Format/FormatTest.cpp
@@ -4647,6 +4647,7 @@ TEST_F(FormatTest, UnderstandsRvalueReferences) {
"};");
verifyGoogleFormat("#define IF(a, b, c) if (a && (b == c))");
verifyGoogleFormat("#define WHILE(a, b, c) while (a && (b == c))");
+ verifyFormat("#define A(a, b) (a && b)");
}
TEST_F(FormatTest, FormatsBinaryOperatorsPrecedingEquals) {
OpenPOWER on IntegriCloud