llvm-project/clang/test/Preprocessor/Inputs
Jan Svoboda 4445135109 [clang][lex] Remark on search path usage
For dependency scanning, it would be useful to collect header search paths (provided on command-line via `-I` and friends) that were actually used during preprocessing. This patch adds that feature to `HeaderSearch` along with a new remark that reports such paths as they get used.

Previous version of this patch tried to use the existing `LookupFileCache` to report used paths via `HitIdx`. That doesn't work for `ComputeUserEntryUsage` (which is intended to be called *after* preprocessing), because it indexes used search paths by the file name. This means the values get overwritten when the code contains `#include_next`.

Note that `HeaderSearch` doesn't use `HeaderSearchOptions::UserEntries` directly. Instead, `InitHeaderSearch` pre-processes them (adds platform-specific paths, removes duplicates, removes paths that don't exist) and creates `DirectoryLookup` instances. This means we need a mechanism for translating between those two. It's not possible to go from `DirectoryLookup` back to the original `HeaderSearch`, so `InitHeaderSearch` now tracks the relationships explicitly.

Depends on D111557.

Reviewed By: dexonsmith

Differential Revision: https://reviews.llvm.org/D102923
2021-10-12 12:20:55 +02:00
..
TestFramework.framework
cycle
headermap-rel
headermap-rel2
include-file-and-dir
include-file-test
include-header-missing-in-framework
include-next-1
include-next-2
include-subdir
include_instead Revert "Revert "[clang][pp] adds '#pragma include_instead'"" 2021-07-29 19:21:43 +00:00
microsoft-header-search
nonportable-hmaps
search-path-usage [clang][lex] Remark on search path usage 2021-10-12 12:20:55 +02:00
llvm-rc.h
llvm-windres.h [llvm-rc] Add a GNU windres-like frontend to llvm-rc 2021-04-26 22:04:29 +03:00
pragma_sysheader.h Add support for #pragma system_header with -fms-extensions 2021-06-23 13:26:03 +02:00