Author: Naveen Seth Hanig
Date: 2026-02-07T21:30:11+01:00
New Revision: f73a0b9973fcdd6c136fce2d674c041147c126fc

URL: 
https://github.com/llvm/llvm-project/commit/f73a0b9973fcdd6c136fce2d674c041147c126fc
DIFF: 
https://github.com/llvm/llvm-project/commit/f73a0b9973fcdd6c136fce2d674c041147c126fc.diff

LOG: [clang] Remove unused parameter from Driver::DiagnoseInputExistence (NFC) 
(#177876)

Added: 
    

Modified: 
    clang/include/clang/Driver/Driver.h
    clang/lib/Driver/Driver.cpp

Removed: 
    


################################################################################
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 63e3b3640891c..a55c5033b57cf 100644
--- a/clang/lib/Driver/Driver.cpp
+++ b/clang/lib/Driver/Driver.cpp
@@ -2882,8 +2882,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;
 
@@ -3122,12 +3122,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));
@@ -3135,7 +3135,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));


        
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to