[clang] [clang][DependencyScanning] Return failure upon CompilerInstanceWithContext failure to create target (PR #211607)
Ian Li via cfe-commits
cfe-commits at lists.llvm.org
Thu Jul 23 11:56:45 PDT 2026
https://github.com/ianayl updated https://github.com/llvm/llvm-project/pull/211607
>From a2fad177580e66e74714edc8d4f033cff77b103d Mon Sep 17 00:00:00 2001
From: "Li, Ian" <ian.li at intel.com>
Date: Wed, 22 Jul 2026 12:36:43 -0700
Subject: [PATCH] Return error if CompilerInstance target creation failed
---
clang/lib/Tooling/DependencyScanningTool.cpp | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/clang/lib/Tooling/DependencyScanningTool.cpp b/clang/lib/Tooling/DependencyScanningTool.cpp
index b435e42af28b4..4072244f33fc3 100644
--- a/clang/lib/Tooling/DependencyScanningTool.cpp
+++ b/clang/lib/Tooling/DependencyScanningTool.cpp
@@ -500,9 +500,7 @@ bool CompilerInstanceWithContext::initialize(
// once here, and the information is reused for all computeDependencies calls.
// We do not need to call createTarget explicitly if we go through
// CompilerInstance::ExecuteAction to perform scanning.
- CI.createTarget();
-
- return true;
+ return CI.createTarget();
}
bool CompilerInstanceWithContext::computeDependencies(
More information about the cfe-commits
mailing list