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