[clang] [clang] Support header shadowing diagnostics in Clang header search (PR #162491)
Jinjie Huang via cfe-commits
cfe-commits at lists.llvm.org
Thu Nov 6 04:53:17 PST 2025
Jinjie-Huang wrote:
Sorry for the delay in this update.
I have refactored the implementation to perform the diagnostic logic within a separate function that replicates the header search paths. The should simplify the implementation and make the source code changes easier to comprehend.
I also observed that many system headers use #include_next and have multiple copies, which could lead to incorrect warnings. So this diagnostic is now performed only for quoted searches to avoid the noise.
As for the existing `ext_pp_include_search_ms` diagnostic, I believe it could be merged into this separate function as well. This would be a nice simplification for HeaderSearch::LookupFile. I'm happy to tackle that in a separate PR if this sounds reasonable.
https://github.com/llvm/llvm-project/pull/162491
More information about the cfe-commits
mailing list