llvm-project
5fa5caa0 - [clang][lex] Cache stat failures in `-Wshadow-header` (#215962)

Commit
14 hours ago
[clang][lex] Cache stat failures in `-Wshadow-header` (#215962) The `-Wshadow-header` warning introduced in https://github.com/llvm/llvm-project/pull/162491 gets enabled by `-Weverything` and causes `O(H*I*S)` extra `status()` syscalls (where H is the number of included headers, I is the average number of inclusions per header, S is the number of search paths). This is caused by proactively probing search paths even after finding a suitable header, and calling `FileManager` with `CacheFailure = false`. There's no reason to not cache the non-existence of header files during these probes. This PR starts caching these, bringing down the complexity to `O(H*S)` and adds a regression test.
Author
Parents
Loading