[clang] [clang-scan-deps] Fix check for empty `Compilation` (PR #75545)

Chuanqi Xu via cfe-commits cfe-commits at lists.llvm.org
Sun Jan 28 17:57:03 PST 2024


================
@@ -728,7 +728,7 @@ getCompilationDataBase(int argc, char **argv, std::string &ErrorMessage) {
                            *Diags);
   std::unique_ptr<driver::Compilation> C(
       TheDriver.BuildCompilation(CommandLine));
-  if (!C)
+  if (C->getJobs().empty())
----------------
ChuanqiXu9 wrote:

```suggestion
  if (!C || C->getJobs().empty())
```

https://github.com/llvm/llvm-project/pull/75545


More information about the cfe-commits mailing list