[clang] [clang-tools-extra] [clang][refactor] Refactor `findNextTokenIncludingComments` (PR #123060)

via cfe-commits cfe-commits at lists.llvm.org
Wed Jan 15 06:28:11 PST 2025


================
@@ -229,9 +229,8 @@ void UseOverrideCheck::check(const MatchFinder::MatchResult &Result) {
   if (HasVirtual) {
     for (Token Tok : Tokens) {
       if (Tok.is(tok::kw_virtual)) {
-        std::optional<Token> NextToken =
-            utils::lexer::findNextTokenIncludingComments(
-                Tok.getEndLoc(), Sources, getLangOpts());
+        std::optional<Token> NextToken = Lexer::findNextToken(
+            Tok.getEndLoc(), Sources, getLangOpts(), /*IncludeComments*/ true);
----------------
cor3ntin wrote:

```suggestion
            Tok.getEndLoc(), Sources, getLangOpts(), /*IncludeComments=*/true);
```

https://github.com/llvm/llvm-project/pull/123060


More information about the cfe-commits mailing list