Skip to content

Commit c1f4603

Browse files
committed
address review comments.
1 parent 005a730 commit c1f4603

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

clang-tools-extra/clang-tidy/modernize/ConcatNestedNamespacesCheck.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ SourceRange NS::getNamespaceBackRange(const SourceManager &SM,
5959
// Back from '}' to conditional '// namespace xxx'
6060
SourceLocation Loc = front()->getRBraceLoc();
6161
std::optional<Token> Tok =
62-
Lexer::findNextToken(Loc, SM, LangOpts, /*IncludeComments*/ true);
62+
utils::lexer::findNextTokenIncludingComments(Loc, SM, LangOpts);
6363
if (!Tok)
6464
return getDefaultNamespaceBackRange();
6565
if (Tok->getKind() != tok::TokenKind::comment)

clang-tools-extra/clang-tidy/modernize/UseOverrideCheck.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -229,8 +229,9 @@ void UseOverrideCheck::check(const MatchFinder::MatchResult &Result) {
229229
if (HasVirtual) {
230230
for (Token Tok : Tokens) {
231231
if (Tok.is(tok::kw_virtual)) {
232-
std::optional<Token> NextToken = Lexer::findNextToken(
233-
Tok.getEndLoc(), Sources, getLangOpts(), /*IncludeComments*/ true);
232+
std::optional<Token> NextToken =
233+
utils::lexer::findNextTokenIncludingComments(
234+
Tok.getEndLoc(), Sources, getLangOpts());
234235
if (NextToken.has_value()) {
235236
Diag << FixItHint::CreateRemoval(CharSourceRange::getCharRange(
236237
Tok.getLocation(), NextToken->getLocation()));

clang-tools-extra/clang-tidy/utils/LexerUtils.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ SourceLocation findNextAnyTokenKind(SourceLocation Start,
8989
}
9090
}
9191

92-
std::optional<Token>
92+
inline std::optional<Token>
9393
findNextTokenIncludingComments(SourceLocation Start, const SourceManager &SM,
9494
const LangOptions &LangOpts) {
9595
return Lexer::findNextToken(Start, SM, LangOpts, true);

0 commit comments

Comments
 (0)