summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/clang-tidy/readability/NamespaceCommentCheck.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang-tools-extra/clang-tidy/readability/NamespaceCommentCheck.cpp')
-rw-r--r--clang-tools-extra/clang-tidy/readability/NamespaceCommentCheck.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/clang-tools-extra/clang-tidy/readability/NamespaceCommentCheck.cpp b/clang-tools-extra/clang-tidy/readability/NamespaceCommentCheck.cpp
index 8a13b5ba239..e57f736f0ea 100644
--- a/clang-tools-extra/clang-tidy/readability/NamespaceCommentCheck.cpp
+++ b/clang-tools-extra/clang-tidy/readability/NamespaceCommentCheck.cpp
@@ -75,7 +75,8 @@ void NamespaceCommentCheck::check(const MatchFinder::MatchResult &Result) {
SourceLocation Loc = AfterRBrace;
Token Tok;
// Skip whitespace until we find the next token.
- while (Lexer::getRawToken(Loc, Tok, Sources, Result.Context->getLangOpts())) {
+ while (Lexer::getRawToken(Loc, Tok, Sources, Result.Context->getLangOpts()) ||
+ Tok.is(tok::semi)) {
Loc = Loc.getLocWithOffset(1);
}
if (!locationsInSameFile(Sources, ND->getRBraceLoc(), Loc))
OpenPOWER on IntegriCloud