File tree Expand file tree Collapse file tree 3 files changed +5
-4
lines changed Expand file tree Collapse file tree 3 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -59,7 +59,7 @@ SourceRange NS::getNamespaceBackRange(const SourceManager &SM,
59
59
// Back from '}' to conditional '// namespace xxx'
60
60
SourceLocation Loc = front ()->getRBraceLoc ();
61
61
std::optional<Token> Tok =
62
- Lexer::findNextToken (Loc, SM, LangOpts, /* IncludeComments */ true );
62
+ utils::lexer::findNextTokenIncludingComments (Loc, SM, LangOpts);
63
63
if (!Tok)
64
64
return getDefaultNamespaceBackRange ();
65
65
if (Tok->getKind () != tok::TokenKind::comment)
Original file line number Diff line number Diff line change @@ -229,8 +229,9 @@ void UseOverrideCheck::check(const MatchFinder::MatchResult &Result) {
229
229
if (HasVirtual) {
230
230
for (Token Tok : Tokens) {
231
231
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 ());
234
235
if (NextToken.has_value ()) {
235
236
Diag << FixItHint::CreateRemoval (CharSourceRange::getCharRange (
236
237
Tok.getLocation (), NextToken->getLocation ()));
Original file line number Diff line number Diff line change @@ -89,7 +89,7 @@ SourceLocation findNextAnyTokenKind(SourceLocation Start,
89
89
}
90
90
}
91
91
92
- std::optional<Token>
92
+ inline std::optional<Token>
93
93
findNextTokenIncludingComments (SourceLocation Start, const SourceManager &SM,
94
94
const LangOptions &LangOpts) {
95
95
return Lexer::findNextToken (Start, SM, LangOpts, true );
You can’t perform that action at this time.
0 commit comments