[clang] [CIR][NFC] Fix an unused variable warning (PR #150758)
Amr Hesham via cfe-commits
cfe-commits at lists.llvm.org
Sat Jul 26 05:44:41 PDT 2025
https://github.com/AmrDeveloper created https://github.com/llvm/llvm-project/pull/150758
This fixes a warning where a variable assigned in 'if' statement wasn't referenced again.
>From 5905c9dd5fd3c2b5428002134cdc736cd31cc889 Mon Sep 17 00:00:00 2001
From: AmrDeveloper <amr96 at programmer.net>
Date: Sat, 26 Jul 2025 14:44:10 +0200
Subject: [PATCH] [CIR][NFC] Fix an unused variable warning
---
clang/lib/CIR/CodeGen/CIRGenExprAggregate.cpp | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
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;
More information about the cfe-commits
mailing list