[clang] [clang] Use File Location for debug info resolution. (PR #163982)

Orlando Cazalet-Hyams via cfe-commits cfe-commits at lists.llvm.org
Tue Oct 28 03:29:06 PDT 2025


OCHyams wrote:

Sorry I hadn't followed the bug thread, I think I see now. It seems fairly reasonable to associate the macro arguments with their source locations rather than the overall macro expansion point. However, I have a few high level questions/concerns:

* I think this might be a departure from GCC's behaviour (@dblaikie in the issue thread you mentioned the Clang behaviour might be a debug info bug but this suggests maybe it's intentional?).
* The .debug_line size will inevitably increase. Does this noticeably impact file size of say, a clang self host build?

I don't think either of those are necessarily blockers.

> maybe have it behind a flag

I like the safety of a flag / chicken-bit (are there situations where this makes macro-heavy code a pain to step through?), but can see the argument for avoiding adding more flags...

Tentative SGTM from over here

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


More information about the cfe-commits mailing list