From 2e96cd6562f64e11b4b3359f867bab8d45a79672 Mon Sep 17 00:00:00 2001 From: Jan Svoboda Date: Tue, 2 Sep 2025 10:43:04 -0700 Subject: [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. --- clang/lib/Frontend/CompilerInvocation.cpp | 5 ----- 1 file changed, 5 deletions(-) (limited to 'clang/lib/Frontend/CompilerInvocation.cpp') 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`. -- cgit v1.1