summaryrefslogtreecommitdiffstats
path: root/clang/lib
diff options
context:
space:
mode:
authorDaniel Jasper <djasper@google.com>2015-11-20 15:26:50 +0000
committerDaniel Jasper <djasper@google.com>2015-11-20 15:26:50 +0000
commit7fa524b4b874529bff9b93b1783bcb29924c782f (patch)
tree530ef253ddbf62da10c2a3f4493c7e3379e921aa /clang/lib
parentd4d3dfd8ef1c58b5ec900ce8c349ccf35dcd2912 (diff)
downloadbcm5719-llvm-7fa524b4b874529bff9b93b1783bcb29924c782f.tar.gz
bcm5719-llvm-7fa524b4b874529bff9b93b1783bcb29924c782f.zip
clang-format: Don't use incorrect space in macro calls with operators.
Before: MACRO(> ); After: MACRO(>); Not overly important, but easy and good for symmetry reasons :-). llvm-svn: 253669
Diffstat (limited to 'clang/lib')
-rw-r--r--clang/lib/Format/TokenAnnotator.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/Format/TokenAnnotator.cpp b/clang/lib/Format/TokenAnnotator.cpp
index 70ff7d8b9e4..751b070cdf9 100644
--- a/clang/lib/Format/TokenAnnotator.cpp
+++ b/clang/lib/Format/TokenAnnotator.cpp
@@ -2047,7 +2047,8 @@ bool TokenAnnotator::spaceRequiredBefore(const AnnotatedLine &Line,
if ((Left.is(TT_TemplateOpener)) != (Right.is(TT_TemplateCloser)))
return Style.SpacesInAngles;
if ((Right.is(TT_BinaryOperator) && !Left.is(tok::l_paren)) ||
- Left.isOneOf(TT_BinaryOperator, TT_ConditionalExpr))
+ (Left.isOneOf(TT_BinaryOperator, TT_ConditionalExpr) &&
+ !Right.is(tok::r_paren)))
return true;
if (Left.is(TT_TemplateCloser) && Right.is(tok::l_paren) &&
Right.isNot(TT_FunctionTypeLParen))
OpenPOWER on IntegriCloud