[clang] 639e811 - [CIR][NFC] Fix an unused variable warning (#143933)

via cfe-commits cfe-commits at lists.llvm.org
Thu Jun 12 11:10:09 PDT 2025


Author: Amr Hesham
Date: 2025-06-12T20:10:05+02:00
New Revision: 639e811434d2c21b9161fe9955acdea28ce33c7b

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

LOG: [CIR][NFC] Fix an unused variable warning (#143933)

This fixes a warning where a variable assigned in 'if' statement wasn't
referenced again.

Added: 
    

Modified: 
    clang/lib/CIR/CodeGen/CIRGenCall.cpp

Removed: 
    


################################################################################
diff  --git a/clang/lib/CIR/CodeGen/CIRGenCall.cpp b/clang/lib/CIR/CodeGen/CIRGenCall.cpp
index da754e0806b2d..67c6a8dd3ef5a 100644
--- a/clang/lib/CIR/CodeGen/CIRGenCall.cpp
+++ b/clang/lib/CIR/CodeGen/CIRGenCall.cpp
@@ -171,7 +171,7 @@ void CIRGenFunction::emitDelegateCallArg(CallArgList &args,
 
   QualType type = param->getType();
 
-  if (const auto *rd = type->getAsCXXRecordDecl()) {
+  if (type->getAsCXXRecordDecl()) {
     cgm.errorNYI(param->getSourceRange(),
                  "emitDelegateCallArg: record argument");
     return;


        


More information about the cfe-commits mailing list