summaryrefslogtreecommitdiffstats
path: root/clang/unittests/Format/FormatTest.cpp
diff options
context:
space:
mode:
authorDaniel Jasper <djasper@google.com>2014-06-30 13:44:47 +0000
committerDaniel Jasper <djasper@google.com>2014-06-30 13:44:47 +0000
commit91beebd04ae90a5f637e080ddf7a340c9c7eb000 (patch)
tree325342482a6f61ca26b2203e021f871a23d6b08c /clang/unittests/Format/FormatTest.cpp
parentae82987cf8f64baafeff49e0446252d0f5db0268 (diff)
downloadbcm5719-llvm-91beebd04ae90a5f637e080ddf7a340c9c7eb000.tar.gz
bcm5719-llvm-91beebd04ae90a5f637e080ddf7a340c9c7eb000.zip
clang-format: Improve expression heuristics.
Upon encountering a binary operator inside parentheses, assume that the parentheses contain an expression. Before: MACRO('0' <= c&& c <= '9'); After: MACRO('0' <= c && c <= '9'); llvm-svn: 212040
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 11a42a51faf..75eea982753 100644
--- a/clang/unittests/Format/FormatTest.cpp
+++ b/clang/unittests/Format/FormatTest.cpp
@@ -4841,6 +4841,7 @@ TEST_F(FormatTest, UnderstandsUsesOfStarAndAmp) {
verifyIndependentOfContext("MACRO(int *i);");
verifyIndependentOfContext("MACRO(auto *a);");
verifyIndependentOfContext("MACRO(const A *a);");
+ verifyIndependentOfContext("MACRO('0' <= c && c <= '9');");
// FIXME: Is there a way to make this work?
// verifyIndependentOfContext("MACRO(A *a);");
OpenPOWER on IntegriCloud