aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Frontend/CompilerInvocation.cpp
diff options
context:
space:
mode:
authorJan Svoboda <jan_svoboda@apple.com>2025-09-02 11:39:26 -0700
committerGitHub <noreply@github.com>2025-09-02 11:39:26 -0700
commit1fc090f7f1dba97bf0c53d3b158ef4934804d3d9 (patch)
tree377702b67beb344cf10e5377c640a1b947c7f68f /clang/lib/Frontend/CompilerInvocation.cpp
parent95d3ecee828528d4b019aae71c4f5581224ddbe2 (diff)
downloadllvm-1fc090f7f1dba97bf0c53d3b158ef4934804d3d9.zip
llvm-1fc090f7f1dba97bf0c53d3b158ef4934804d3d9.tar.gz
llvm-1fc090f7f1dba97bf0c53d3b158ef4934804d3d9.tar.bz2
[clang][analyzer] Delay checking the ctu-dir (#150139)
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 `ctu-dir` is an existing directory.
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
-rw-r--r--clang/lib/Frontend/CompilerInvocation.cpp4
1 files changed, 0 insertions, 4 deletions
diff --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp
index 3c301de..f8fecba 100644
--- a/clang/lib/Frontend/CompilerInvocation.cpp
+++ b/clang/lib/Frontend/CompilerInvocation.cpp
@@ -1322,10 +1322,6 @@ static void parseAnalyzerConfigs(AnalyzerOptions &AnOpts,
if (AnOpts.ShouldTrackConditionsDebug && !AnOpts.ShouldTrackConditions)
Diags->Report(diag::err_analyzer_config_invalid_input)
<< "track-conditions-debug" << "'track-conditions' to also be enabled";
-
- if (!AnOpts.CTUDir.empty() && !llvm::sys::fs::is_directory(AnOpts.CTUDir))
- Diags->Report(diag::err_analyzer_config_invalid_input) << "ctu-dir"
- << "a filename";
}
/// Generate a remark argument. This is an inverse of `ParseOptimizationRemark`.