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

Oliver Hunt via cfe-commits cfe-commits at lists.llvm.org
Fri May 30 08:12:28 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
----------------
ojhunt wrote:

@shafik sorry a more direct answer: the existing tests exposed not handling some macro cases correctly, specifically those that result in variations on unresolvable locations, but I had a pile of work, and now I'm on vacation and trying to Vacation Correctly(tm) and not do work so I haven't got back to this.

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


More information about the cfe-commits mailing list