[clang] [clang] Correct FixIt ranges for unused capture warnings (PR #141148)

Shafik Yaghmour via cfe-commits cfe-commits at lists.llvm.org
Tue May 27 17:49:02 PDT 2025


================
@@ -972,6 +972,12 @@ class Sema final : public SemaBase {
   /// Calls \c Lexer::getLocForEndOfToken()
   SourceLocation getLocForEndOfToken(SourceLocation Loc, unsigned Offset = 0);
 
+  /// Calls \c Lexer::findNextToken() to find the next token, and if the
+  /// locations of both ends of the token can be resolved it return that
----------------
shafik wrote:

I am curious when would this not happen `both ends of the token can be resolved`? I guess when we have invalid code? Do we test that?

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


More information about the cfe-commits mailing list