Before:
const char *x =
"hello llvm";
After:
const char *x = "hello llvm";
This fixes llvm.org/PR22245.
Patch by Bill Meltsner, thank you!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@226564
91177308-0d34-0410-b5e6-
96231b3b80d8
if (Current.getNextNonComment() &&
Current.getNextNonComment()->isStringLiteral())
return true; // Implicit concatenation.
- if (State.Column + Current.ColumnWidth + Current.UnbreakableTailLength >
- Style.ColumnLimit)
+ if (Style.ColumnLimit != 0 &&
+ State.Column + Current.ColumnWidth + Current.UnbreakableTailLength >
+ Style.ColumnLimit)
return true; // String will be split.
return false;
}
format("NSString *const kString = @\"aaaa\"\n"
"\"bbbb\";",
Break));
+
+ Break.ColumnLimit = 0;
+ verifyFormat("const char *hello = \"hello llvm\";", Break);
}
TEST_F(FormatTest, AlignsPipes) {