[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


================
@@ -59,7 +59,7 @@ SourceRange NS::getNamespaceBackRange(const SourceManager &SM,
   // Back from '}' to conditional '// namespace xxx'
   SourceLocation Loc = front()->getRBraceLoc();
   std::optional<Token> Tok =
-      utils::lexer::findNextTokenIncludingComments(Loc, SM, LangOpts);
+      Lexer::findNextToken(Loc, SM, LangOpts, /*IncludeComments*/ true);
----------------
cor3ntin wrote:

```suggestion
      Lexer::findNextToken(Loc, SM, LangOpts, /*IncludeComments=*/true);
```

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


More information about the cfe-commits mailing list