diff options
Diffstat (limited to 'clang/lib/Format/TokenAnnotator.cpp')
| -rw-r--r-- | clang/lib/Format/TokenAnnotator.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/Format/TokenAnnotator.cpp b/clang/lib/Format/TokenAnnotator.cpp index 4a1fc08455e5..c52fe12e7ffd 100644 --- a/clang/lib/Format/TokenAnnotator.cpp +++ b/clang/lib/Format/TokenAnnotator.cpp @@ -3065,8 +3065,8 @@ void TokenAnnotator::setCommentLineLevels( // If the comment is currently aligned with the line immediately following // it, that's probably intentional and we should keep it. - if (NextNonCommentLine && !NextNonCommentLine->First->Finalized && - Line->isComment() && NextNonCommentLine->First->NewlinesBefore <= 1 && + if (NextNonCommentLine && NextNonCommentLine->First->NewlinesBefore < 2 && + Line->isComment() && !isClangFormatOff(Line->First->TokenText) && NextNonCommentLine->First->OriginalColumn == Line->First->OriginalColumn) { const bool PPDirectiveOrImportStmt = |
