[clang] [FixIt] Improve Source Ranges and Fix-It Hints for Unused Lambda Captures #106445 (PR #117953)

via cfe-commits cfe-commits at lists.llvm.org
Mon Dec 16 11:05:31 PST 2024


charan-003 wrote:

Hi @cor3ntin 

After making changes in ParseExprCXX.cpp, I’m down to 10 failing test cases related to lambda parsing and Fix-It hints for unused captures. I reviewed Parser::ParseLambdaIntroducer and checked how SourceLocation LocEnd = PrevTokLocation; is used, but I’m still uncertain about where the incorrect source ranges might be originating.

Could you suggest:

Specific Parsing Logic: Which part of ParseLambdaIntroducer should I focus on when debugging incorrect source ranges? Are there common issues with PrevTokLocation assignments?

Source Location Validations: Would it be helpful to insert assertions or debug prints at specific points in the parser to check computed source ranges during parsing?

Next Steps: Given the test cases I shared earlier, would focusing on a particular test provide better insight into the issue?

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


More information about the cfe-commits mailing list