summaryrefslogtreecommitdiffstats
path: root/clang/lib/Format
diff options
context:
space:
mode:
authorDaniel Jasper <djasper@google.com>2013-02-28 09:21:10 +0000
committerDaniel Jasper <djasper@google.com>2013-02-28 09:21:10 +0000
commitd8ffcfa9b87c9d08022cc916d41044d2d18e2cfd (patch)
tree54e17ff67a652e8ccf9f15e74ce4f737baf440a8 /clang/lib/Format
parent4c9300e630145f6f0a6b622393d83bbe46e5c4f5 (diff)
downloadbcm5719-llvm-d8ffcfa9b87c9d08022cc916d41044d2d18e2cfd.tar.gz
bcm5719-llvm-d8ffcfa9b87c9d08022cc916d41044d2d18e2cfd.zip
Fix spacing after binary operator as macro parameter.
Before: COMPARE(a, == , b); After: COMPARE(a, ==, b); llvm-svn: 176241
Diffstat (limited to 'clang/lib/Format')
-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 164b722f820..6b91993c4ff 100644
--- a/clang/lib/Format/TokenAnnotator.cpp
+++ b/clang/lib/Format/TokenAnnotator.cpp
@@ -1048,7 +1048,8 @@ bool TokenAnnotator::spaceRequiredBefore(const AnnotatedLine &Line,
Tok.Parent->Type == TT_TemplateCloser &&
Style.Standard != FormatStyle::LS_Cpp11;
}
- if (Tok.Type == TT_BinaryOperator || Tok.Parent->Type == TT_BinaryOperator)
+ if (Tok.Type == TT_BinaryOperator ||
+ (Tok.Parent->Type == TT_BinaryOperator && Tok.isNot(tok::comma)))
return true;
if (Tok.Parent->Type == TT_TemplateCloser && Tok.is(tok::l_paren))
return false;
OpenPOWER on IntegriCloud