aboutsummaryrefslogtreecommitdiff
path: root/lib/Format/TokenAnnotator.cpp
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
commit807809c421811509f488f3ebd249585025ad918a (patch)
treeab90578ed23fdb005e6168137c045b0769c62ecc /lib/Format/TokenAnnotator.cpp
parent16cda861c5587d7130a216466a29a808673c1656 (diff)
Fix spacing after binary operator as macro parameter.
Before: COMPARE(a, == , b); After: COMPARE(a, ==, b); git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176241 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Format/TokenAnnotator.cpp')
-rw-r--r--lib/Format/TokenAnnotator.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Format/TokenAnnotator.cpp b/lib/Format/TokenAnnotator.cpp
index 164b722f82..6b91993c4f 100644
--- a/lib/Format/TokenAnnotator.cpp
+++ b/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;