These used to interact badly with AlwaysBreakBeforeMultilineStrings.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@207955
91177308-0d34-0410-b5e6-
96231b3b80d8
bool ContinuationIndenter::nextIsMultilineString(const LineState &State) {
const FormatToken &Current = *State.NextToken;
- if (!Current.isStringLiteral())
+ if (!Current.isStringLiteral() || Current.Type == TT_ImplicitStringLiteral)
return false;
// We never consider raw string literals "multiline" for the purpose of
// AlwaysBreakBeforeMultilineStrings implementation as they are special-cased
// Protocol buffer definition or missing "#".
verifyFormat("import \"aaaaaaaaaaaaaaaaa/aaaaaaaaaaaaaaa\";",
getLLVMStyleWithColumns(30));
+
+ FormatStyle Style = getLLVMStyle();
+ Style.AlwaysBreakBeforeMultilineStrings = true;
+ Style.ColumnLimit = 0;
+ verifyFormat("#import \"abc.h\"", Style);
}
//===----------------------------------------------------------------------===//