diff options
Diffstat (limited to 'clang/lib/Format/Format.cpp')
-rw-r--r-- | clang/lib/Format/Format.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/clang/lib/Format/Format.cpp b/clang/lib/Format/Format.cpp index 3c740d9d84c..84bf36c7fd2 100644 --- a/clang/lib/Format/Format.cpp +++ b/clang/lib/Format/Format.cpp @@ -596,8 +596,11 @@ private: FormatTok->CodePointCount = encoding::getCodePointCount(FormatTok->TokenText, Encoding); - // FIXME: Add the CodePointCount to Column. + if (FormatTok->isOneOf(tok::string_literal, tok::comment) && + FormatTok->TokenText.find('\n') != StringRef::npos) + FormatTok->IsMultiline = true; + // FIXME: Add the CodePointCount to Column. FormatTok->WhitespaceRange = SourceRange( WhitespaceStart, WhitespaceStart.getLocWithOffset(WhitespaceLength)); return FormatTok; |