summaryrefslogtreecommitdiffstats
path: root/clang/unittests/Format/FormatTest.cpp
diff options
context:
space:
mode:
authorDaniel Jasper <djasper@google.com>2013-11-07 19:56:07 +0000
committerDaniel Jasper <djasper@google.com>2013-11-07 19:56:07 +0000
commita98da3d236ac9cf8cf1e818069245fcdf307b783 (patch)
treed474aabb68707987a04abe2a476d6399c0c95d36 /clang/unittests/Format/FormatTest.cpp
parent786d8a26f22e72b8fb8074df613b42c8e79a51ea (diff)
downloadbcm5719-llvm-a98da3d236ac9cf8cf1e818069245fcdf307b783.tar.gz
bcm5719-llvm-a98da3d236ac9cf8cf1e818069245fcdf307b783.zip
clang-format: Improve binary operator detection in macros.
Before: #define M(NAME) assert(!Context.Verifying &&#NAME); After: #define M(NAME) assert(!Context.Verifying && #NAME); This fixes llvm.org/PR16156. llvm-svn: 194216
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 1822a24597e..3684e071fdd 100644
--- a/clang/unittests/Format/FormatTest.cpp
+++ b/clang/unittests/Format/FormatTest.cpp
@@ -4081,6 +4081,7 @@ TEST_F(FormatTest, UnderstandsUsesOfStarAndAmp) {
verifyFormat("for (int i = 0; i < a * a; ++i) {\n}");
verifyGoogleFormat("for (int i = 0; i * 2 < z; i *= 2) {\n}");
+ verifyFormat("#define A (!a * b)");
verifyFormat("#define MACRO \\\n"
" int *i = a * b; \\\n"
" void f(a *b);",
OpenPOWER on IntegriCloud