summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/clang-tidy/llvm/NamespaceCommentCheck.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang-tools-extra/clang-tidy/llvm/NamespaceCommentCheck.cpp')
-rw-r--r--clang-tools-extra/clang-tidy/llvm/NamespaceCommentCheck.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/clang-tools-extra/clang-tidy/llvm/NamespaceCommentCheck.cpp b/clang-tools-extra/clang-tidy/llvm/NamespaceCommentCheck.cpp
index b5dca4ba13f..d9789fe2dda 100644
--- a/clang-tools-extra/clang-tidy/llvm/NamespaceCommentCheck.cpp
+++ b/clang-tools-extra/clang-tidy/llvm/NamespaceCommentCheck.cpp
@@ -71,6 +71,8 @@ void NamespaceCommentCheck::check(const MatchFinder::MatchResult &Result) {
return;
bool NextTokenIsOnSameLine = Sources.getSpellingLineNumber(Loc) == EndLine;
+ // If we insert a line comment before the token in the same line, we need
+ // to insert a line break.
bool NeedLineBreak = NextTokenIsOnSameLine && Tok.isNot(tok::eof);
// Try to find existing namespace closing comment on the same line.
OpenPOWER on IntegriCloud