diff options
author | Daniel Jasper <djasper@google.com> | 2018-03-12 10:11:30 +0000 |
---|---|---|
committer | Daniel Jasper <djasper@google.com> | 2018-03-12 10:11:30 +0000 |
commit | dd0c4e1d83d79fe7409426a42d28c40936881ba1 (patch) | |
tree | bcc1f70cfd0c84fb91b8a94622361105ec43f0c3 /clang/lib/Format/ContinuationIndenter.cpp | |
parent | 24b6640b1b846c7ddc8fac16fd438cb616693498 (diff) | |
download | bcm5719-llvm-dd0c4e1d83d79fe7409426a42d28c40936881ba1.tar.gz bcm5719-llvm-dd0c4e1d83d79fe7409426a42d28c40936881ba1.zip |
Don't re-format raw string literal contents when formatting is disable
Not entirely sure this is the best place to put this check, but it fixes
the immediate issue.
llvm-svn: 327253
Diffstat (limited to 'clang/lib/Format/ContinuationIndenter.cpp')
-rw-r--r-- | clang/lib/Format/ContinuationIndenter.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Format/ContinuationIndenter.cpp b/clang/lib/Format/ContinuationIndenter.cpp index d53cf808ddc..000f82a0210 100644 --- a/clang/lib/Format/ContinuationIndenter.cpp +++ b/clang/lib/Format/ContinuationIndenter.cpp @@ -1480,7 +1480,7 @@ unsigned ContinuationIndenter::handleEndOfLine(const FormatToken &Current, // Compute the raw string style to use in case this is a raw string literal // that can be reformatted. auto RawStringStyle = getRawStringStyle(Current, State); - if (RawStringStyle) { + if (RawStringStyle && !Current.Finalized) { Penalty = reformatRawStringLiteral(Current, State, *RawStringStyle, DryRun); } else if (Current.IsMultiline && Current.isNot(TT_BlockComment)) { // Don't break multi-line tokens other than block comments and raw string |