aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Frontend/CompilerInvocation.cpp
diff options
context:
space:
mode:
authorJan Svoboda <jan_svoboda@apple.com>2025-09-02 10:43:04 -0700
committerGitHub <noreply@github.com>2025-09-02 10:43:04 -0700
commit2e96cd6562f64e11b4b3359f867bab8d45a79672 (patch)
tree5c7e9debfc0432883d64f1351093cc5409120c84 /clang/lib/Frontend/CompilerInvocation.cpp
parent4d2e1e1c74c1e437b23fccd4ea545d2f7d43d1d2 (diff)
downloadllvm-2e96cd6562f64e11b4b3359f867bab8d45a79672.zip
llvm-2e96cd6562f64e11b4b3359f867bab8d45a79672.tar.gz
llvm-2e96cd6562f64e11b4b3359f867bab8d45a79672.tar.bz2
[clang][analyzer] Delay checking the model-path (#150133)
This PR is part of an effort to remove file system usage from the command line parsing code. The reason for that is that it's impossible to do file system access correctly without a configured VFS, and the VFS can only be configured after the command line is parsed. I don't want to intertwine command line parsing and VFS configuration, so I decided to perform the file system access after the command line is parsed and the VFS is configured - ideally right before the file system entity is used for the first time. This patch delays checking that `model-path` is an existing directory.
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
-rw-r--r--clang/lib/Frontend/CompilerInvocation.cpp5
1 files changed, 0 insertions, 5 deletions
diff --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp
index aadda69..3c301de 100644
--- a/clang/lib/Frontend/CompilerInvocation.cpp
+++ b/clang/lib/Frontend/CompilerInvocation.cpp
@@ -1326,11 +1326,6 @@ static void parseAnalyzerConfigs(AnalyzerOptions &AnOpts,
if (!AnOpts.CTUDir.empty() && !llvm::sys::fs::is_directory(AnOpts.CTUDir))
Diags->Report(diag::err_analyzer_config_invalid_input) << "ctu-dir"
<< "a filename";
-
- if (!AnOpts.ModelPath.empty() &&
- !llvm::sys::fs::is_directory(AnOpts.ModelPath))
- Diags->Report(diag::err_analyzer_config_invalid_input) << "model-path"
- << "a filename";
}
/// Generate a remark argument. This is an inverse of `ParseOptimizationRemark`.