diff options
author | Manuel Klimek <klimek@google.com> | 2014-04-11 12:27:47 +0000 |
---|---|---|
committer | Manuel Klimek <klimek@google.com> | 2014-04-11 12:27:47 +0000 |
commit | 1fcbe675faf60f0ace39c879e423f17bae4e2947 (patch) | |
tree | d0d61c6af18b9fafe8e70543f3fb91cc05099c7f /clang/lib/Format/TokenAnnotator.cpp | |
parent | d326c811170f304ffcf6d4362996cf4317b3f0f2 (diff) | |
download | bcm5719-llvm-1fcbe675faf60f0ace39c879e423f17bae4e2947.tar.gz bcm5719-llvm-1fcbe675faf60f0ace39c879e423f17bae4e2947.zip |
Correctly handle escaped newlines when the next token starts without a space.
We will need this to correctly handle conflict markers inside macro
definitions.
llvm-svn: 206029
Diffstat (limited to 'clang/lib/Format/TokenAnnotator.cpp')
-rw-r--r-- | clang/lib/Format/TokenAnnotator.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Format/TokenAnnotator.cpp b/clang/lib/Format/TokenAnnotator.cpp index df5603b2682..174a7fa2022 100644 --- a/clang/lib/Format/TokenAnnotator.cpp +++ b/clang/lib/Format/TokenAnnotator.cpp @@ -1511,7 +1511,7 @@ bool TokenAnnotator::mustBreakBefore(const AnnotatedLine &Line, if (Right.is(tok::comment)) { return Right.Previous->BlockKind != BK_BracedInit && Right.Previous->Type != TT_CtorInitializerColon && - Right.NewlinesBefore > 0; + (Right.NewlinesBefore > 0 && Right.HasUnescapedNewline); } else if (Right.Previous->isTrailingComment() || (Right.isStringLiteral() && Right.Previous->isStringLiteral())) { return true; |