jansvoboda11 wrote: How about something like this? ```c++ auto FE = CI.getFileManager().getOptionalFileEntryRef("foo.h"); bool IsFooIncluded = FE && CI.getPreprocessor().getIncludedFiles().contains(*FE); ``` https://github.com/llvm/llvm-project/pull/74910