[clang] Do not print locations in anonymous tag names. (PR #159592)
Reid Kleckner via cfe-commits
cfe-commits at lists.llvm.org
Fri Sep 19 12:33:14 PDT 2025
rnk wrote:
I think coming up with a scope chain like @dwblaikie described would probably be the best outcome because it is resilient to source code drift, but another possible alternative to consider would be to use the file basename with canonicalized case for case-insensitive file systems, plus the line:col. This assumes that most of the verifier failures you are encountering are driven by header file search path mismatches and path traversal component matches (`/foo/bar.h:123` vs `/foo/../foo/bar.h:123`), but there's also case-insensitive filesystems to consider.
The downside to this approach is that it is fragile in the presence of source code drift, i.e. if I add a comment block to a shared header and recompile half my application, I could get debug info verifier check failures. This is not technically an ODR violation, but it is a kind of build system dependency tracking failure, but it depends where you want to make the tradeoff between debuggability, effort, and verification reliability.
https://github.com/llvm/llvm-project/pull/159592
More information about the cfe-commits
mailing list