With Style.BreakBeforeBinaryOperators, clang-format breaks incorrectly.
This fixes llvm.org/PR17994.
Before:
return boost::fusion::at_c<0>(iiii).second == boost::fusion::at_c
<1>(iiii).second;
After:
return boost::fusion::at_c<0>(iiii).second ==
boost::fusion::at_c<1>(iiii).second;
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@195552
91177308-0d34-0410-b5e6-
96231b3b80d8
if (Right.Type == TT_CtorInitializerComma &&
Style.BreakConstructorInitializersBeforeComma)
return true;
- if (Right.isBinaryOperator() && Style.BreakBeforeBinaryOperators)
+ if (Right.Type == TT_BinaryOperator && Style.BreakBeforeBinaryOperators)
return true;
if (Left.is(tok::greater) && Right.is(tok::greater) &&
Left.Type != TT_TemplateCloser)
" + sizeof(int32_t) // Offset of CU in the .debug_info section\n"
" + sizeof(int8_t) // Pointer Size (in bytes)\n"
" + sizeof(int8_t); // Segment Size (in bytes)");
+
+ verifyFormat("return boost::fusion::at_c<0>(iiii).second\n"
+ " == boost::fusion::at_c<1>(iiii).second;",
+ Style);
}
TEST_F(FormatTest, ConstructorInitializers) {