[clang] Emit debug info with original source location for tokens from macros … (PR #163190)
via cfe-commits
cfe-commits at lists.llvm.org
Fri Oct 17 09:24:34 PDT 2025
SergejSalnikov wrote:
> it's probably not practical to test all the modified code paths - any thoughts on what the right testing tradeoff is here? That various codepaths /inside/ getRefinedSpellingLoc are tested, from perhaps a variety of call sites/ways that manifests in the resulting IR metadata without being exhaustive, seems OK to me? (so perhaps in the test case at least an instruction location and a type location could be tested?)
I've added asserts in the places where we already expect the file location. This is an optimization to avoid expansion for the same location 3 or more times. We usually perform 3 operations back to back: `getFileID`, `getFileName`, `getLineNumber`.
https://github.com/llvm/llvm-project/pull/163190
More information about the cfe-commits
mailing list