forked from OSchip/llvm-project
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:
parent
d4d3dfd8ef
commit
7fa524b4b8
|
@ -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))
|
||||
|
|
|
@ -2927,6 +2927,8 @@ TEST_F(FormatTest, MacroCallsWithoutTrailingSemicolon) {
|
|||
" EXCLUSIVE_LOCK_FUNCTION(mu_);\n"
|
||||
"};",
|
||||
getLLVMStyleWithColumns(40)));
|
||||
|
||||
verifyFormat("MACRO(>)");
|
||||
}
|
||||
|
||||
TEST_F(FormatTest, LayoutMacroDefinitionsStatementsSpanningBlocks) {
|
||||
|
|
Loading…
Reference in New Issue