[clang] [clang] Support header shadowing diagnostics in Clang header search (PR #162491)

Qiu Chaofan via cfe-commits cfe-commits at lists.llvm.org
Wed Nov 5 04:43:05 PST 2025


ecnelises wrote:

I'm also not sure if this handles system headers specially. As typical cases, `stdatomic.h` and `math.h` exist in both C++ stdlib headers and C stdlib headers (due to some standard incompatibility). Should these warnings be also treated as expected?

```
$ find . -name math.h
./sysroot/usr/include/math.h
./include/c++/xxx/tr1/math.h
./include/c++/xxx/math.h
./lib/clang/xxx/include/openmp_wrappers/math.h

$ find . -name stdatomic.h
./include/c++/xxx/stdatomic.h
./lib/clang/xx/include/stdatomic.h
./lib/gcc/x86_64-linux-gnu/xxx/include/stdatomic.h
```

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


More information about the cfe-commits mailing list