[clang] [clang] Support header shadowing diagnostics in Clang header search (PR #162491)
Qiu Chaofan via cfe-commits
cfe-commits at lists.llvm.org
Mon Nov 3 00:11:06 PST 2025
================
@@ -557,6 +557,10 @@ def warn_pp_hdrstop_filename_ignored : Warning<
def remark_pp_search_path_usage : Remark<
"search path used: '%0'">,
InGroup<UsedSearchPath>;
+def warn_header_shadowed
+ : Warning<"multiple candidates for header '%0' found; "
+ "using the one from '%1', shadowed by '%2'">,
----------------
ecnelises wrote:
When we have `dir1/a.h` and `dir2/a.h` and `dir1` has higher priority, is `shadowed by 'dir2'` a bit confusing?
Maybe as ...
> multiple candidates for header 'a.h' found; directory 'dir1' chosen, ignoring 'dir2'
https://github.com/llvm/llvm-project/pull/162491
More information about the cfe-commits
mailing list