Now, this can be properly formatted:
static_cast<A< //
B> *>( //
);
Before, clang-format could end up, not formatting the code at all.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@213055
91177308-0d34-0410-b5e6-
96231b3b80d8
// ...
// As they hide "DoSomething" and are generally bad for readability.
if (Previous.opensScope() && Previous.isNot(tok::l_brace) &&
- State.LowestLevelOnLine < State.StartOfLineLevel)
+ State.LowestLevelOnLine < State.StartOfLineLevel &&
+ State.LowestLevelOnLine < Current.NestingLevel)
return false;
if (Current.isMemberAccess() && State.Stack.back().ContainsUnwrappedBuilder)
return false;
" aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa>(\n"
" bbbbbbbbbbbbbbbbbbbbbbbb);",
getLLVMStyleWithColumns(72));
+ EXPECT_EQ("static_cast<A< //\n"
+ " B> *>(\n"
+ "\n"
+ " );",
+ format("static_cast<A<//\n"
+ " B>*>(\n"
+ "\n"
+ " );"));
FormatStyle AlwaysBreak = getLLVMStyle();
AlwaysBreak.AlwaysBreakTemplateDeclarations = true;