[clang] [clang] Remove unused parameter from Driver::DiagnoseInputExistence (NFC) (PR #177876)
via cfe-commits
cfe-commits at lists.llvm.org
Sun Jan 25 11:59:09 PST 2026
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-clang-driver
Author: Naveen Seth Hanig (naveen-seth)
<details>
<summary>Changes</summary>
---
Full diff: https://github.com/llvm/llvm-project/pull/177876.diff
2 Files Affected:
- (modified) clang/include/clang/Driver/Driver.h (+1-2)
- (modified) clang/lib/Driver/Driver.cpp (+5-5)
``````````diff
diff --git a/clang/include/clang/Driver/Driver.h b/clang/include/clang/Driver/Driver.h
index b7bd1bc8aab49..f7c138027bdae 100644
--- a/clang/include/clang/Driver/Driver.h
+++ b/clang/include/clang/Driver/Driver.h
@@ -546,8 +546,7 @@ class Driver {
/// issue a diagnostic and return false.
/// If TypoCorrect is true and the file does not exist, see if it looks
/// like a likely typo for a flag and if so print a "did you mean" blurb.
- bool DiagnoseInputExistence(const llvm::opt::DerivedArgList &Args,
- StringRef Value, types::ID Ty,
+ bool DiagnoseInputExistence(StringRef Value, types::ID Ty,
bool TypoCorrect) const;
/// BuildJobs - Bind actions to concrete tools and translate
diff --git a/clang/lib/Driver/Driver.cpp b/clang/lib/Driver/Driver.cpp
index eb3f9cbea2845..b35e72c9c898f 100644
--- a/clang/lib/Driver/Driver.cpp
+++ b/clang/lib/Driver/Driver.cpp
@@ -2866,8 +2866,8 @@ void Driver::BuildUniversalActions(Compilation &C, const ToolChain &TC,
}
}
-bool Driver::DiagnoseInputExistence(const DerivedArgList &Args, StringRef Value,
- types::ID Ty, bool TypoCorrect) const {
+bool Driver::DiagnoseInputExistence(StringRef Value, types::ID Ty,
+ bool TypoCorrect) const {
if (!getCheckInputsExist())
return true;
@@ -3106,12 +3106,12 @@ void Driver::BuildInputs(const ToolChain &TC, DerivedArgList &Args,
Args.hasArgNoClaim(options::OPT_hipstdpar))
Ty = types::TY_HIP;
- if (DiagnoseInputExistence(Args, Value, Ty, /*TypoCorrect=*/true))
+ if (DiagnoseInputExistence(Value, Ty, /*TypoCorrect=*/true))
Inputs.push_back(std::make_pair(Ty, A));
} else if (A->getOption().matches(options::OPT__SLASH_Tc)) {
StringRef Value = A->getValue();
- if (DiagnoseInputExistence(Args, Value, types::TY_C,
+ if (DiagnoseInputExistence(Value, types::TY_C,
/*TypoCorrect=*/false)) {
Arg *InputArg = MakeInputArg(Args, Opts, A->getValue());
Inputs.push_back(std::make_pair(types::TY_C, InputArg));
@@ -3119,7 +3119,7 @@ void Driver::BuildInputs(const ToolChain &TC, DerivedArgList &Args,
A->claim();
} else if (A->getOption().matches(options::OPT__SLASH_Tp)) {
StringRef Value = A->getValue();
- if (DiagnoseInputExistence(Args, Value, types::TY_CXX,
+ if (DiagnoseInputExistence(Value, types::TY_CXX,
/*TypoCorrect=*/false)) {
Arg *InputArg = MakeInputArg(Args, Opts, A->getValue());
Inputs.push_back(std::make_pair(types::TY_CXX, InputArg));
``````````
</details>
https://github.com/llvm/llvm-project/pull/177876
More information about the cfe-commits
mailing list