Author: Amr Hesham
Date: 2025-07-27T11:54:38+02:00
New Revision: cf1abe67b9c6881527e42c1f6571665bb506b708

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

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

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

Added: 
    

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

Removed: 
    


################################################################################
diff  --git a/clang/lib/CIR/CodeGen/CIRGenExprAggregate.cpp 
b/clang/lib/CIR/CodeGen/CIRGenExprAggregate.cpp
index d8459b4688137..51aab95e02e66 100644
--- a/clang/lib/CIR/CodeGen/CIRGenExprAggregate.cpp
+++ b/clang/lib/CIR/CodeGen/CIRGenExprAggregate.cpp
@@ -438,8 +438,7 @@ void AggExprEmitter::visitCXXParenListOrInitListExpr(
     // Push a destructor if necessary.
     // FIXME: if we have an array of structures, all explicitly
     // initialized, we can end up pushing a linear number of cleanups.
-    if (QualType::DestructionKind dtorKind =
-            field->getType().isDestructedType()) {
+    if (field->getType().isDestructedType()) {
       cgf.cgm.errorNYI(e->getSourceRange(),
                        "visitCXXParenListOrInitListExpr destructor");
       return;


        
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to