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
This commit is contained in:
Daniel Jasper 2015-11-20 15:26:50 +00:00
parent d4d3dfd8ef
commit 7fa524b4b8
2 changed files with 4 additions and 1 deletions

View File

@ -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))

View File

@ -2927,6 +2927,8 @@ TEST_F(FormatTest, MacroCallsWithoutTrailingSemicolon) {
" EXCLUSIVE_LOCK_FUNCTION(mu_);\n"
"};",
getLLVMStyleWithColumns(40)));
verifyFormat("MACRO(>)");
}
TEST_F(FormatTest, LayoutMacroDefinitionsStatementsSpanningBlocks) {