diff options
author | Daniel Jasper <djasper@google.com> | 2015-01-04 09:11:17 +0000 |
---|---|---|
committer | Daniel Jasper <djasper@google.com> | 2015-01-04 09:11:17 +0000 |
commit | 428f0b1430b6850492070d7c4803e698940c1ab3 (patch) | |
tree | 289b7683b95e46e42de5c9e434e69ed40d959e2a /clang/lib/Format/ContinuationIndenter.cpp | |
parent | 3ce01c34c051ab690151348ca633c42e6b4212ef (diff) | |
download | bcm5719-llvm-428f0b1430b6850492070d7c4803e698940c1ab3.tar.gz bcm5719-llvm-428f0b1430b6850492070d7c4803e698940c1ab3.zip |
clang-format: Re-enable comment re-indentation for Java/JS.
This was broken by r224120.
llvm-svn: 225130
Diffstat (limited to 'clang/lib/Format/ContinuationIndenter.cpp')
-rw-r--r-- | clang/lib/Format/ContinuationIndenter.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/clang/lib/Format/ContinuationIndenter.cpp b/clang/lib/Format/ContinuationIndenter.cpp index b50a9a9a127..53876bab581 100644 --- a/clang/lib/Format/ContinuationIndenter.cpp +++ b/clang/lib/Format/ContinuationIndenter.cpp @@ -905,12 +905,6 @@ unsigned ContinuationIndenter::addMultilineToken(const FormatToken &Current, unsigned ContinuationIndenter::breakProtrudingToken(const FormatToken &Current, LineState &State, bool DryRun) { - // FIXME: String literal breaking is currently disabled for Java and JS, as - // it requires strings to be merged using "+" which we don't support. - if (Style.Language == FormatStyle::LK_Java || - Style.Language == FormatStyle::LK_JavaScript) - return 0; - // Don't break multi-line tokens other than block comments. Instead, just // update the state. if (Current.isNot(TT_BlockComment) && Current.IsMultiline) @@ -929,6 +923,12 @@ unsigned ContinuationIndenter::breakProtrudingToken(const FormatToken &Current, unsigned ColumnLimit = getColumnLimit(State); if (Current.isStringLiteral()) { + // FIXME: String literal breaking is currently disabled for Java and JS, as + // it requires strings to be merged using "+" which we don't support. + if (Style.Language == FormatStyle::LK_Java || + Style.Language == FormatStyle::LK_JavaScript) + return 0; + // Don't break string literals inside preprocessor directives (except for // #define directives, as their contents are stored in separate lines and // are not affected by this check). |