[clang] [clang] Implement -Wmissing-include-dirs (PR #94827)
via cfe-commits
cfe-commits at lists.llvm.org
Mon Jun 10 02:43:48 PDT 2024
================
@@ -1271,6 +1271,12 @@ Compilation *Driver::BuildCompilation(ArrayRef<const char *> ArgList) {
if (VFS->setCurrentWorkingDirectory(WD->getValue()))
Diag(diag::err_drv_unable_to_set_working_directory) << WD->getValue();
+ // Check for missing include directories
+ for (auto IncludeDir : Args.getAllArgValues(options::OPT_I_Group)) {
+ if (!llvm::sys::fs::is_directory(IncludeDir))
----------------
zmodem wrote:
I think we should go through the VFS here, something like `VFS.exist(IncludeDir)`
https://github.com/llvm/llvm-project/pull/94827
More information about the cfe-commits
mailing list