Author: Amr Hesham Date: 2025-05-03T22:00:15+02:00 New Revision: 8d8a3d9fdcbe823b94e2821b7beb8ead5288b14e
URL: https://github.com/llvm/llvm-project/commit/8d8a3d9fdcbe823b94e2821b7beb8ead5288b14e DIFF: https://github.com/llvm/llvm-project/commit/8d8a3d9fdcbe823b94e2821b7beb8ead5288b14e.diff LOG: [CIR][NFC] Fix an unused variable warning (#138415) This fixes a warning where a variable assigned in 'if' statement wasn't referenced again. Added: Modified: clang/lib/CIR/CodeGen/CIRGenExprConstant.cpp Removed: ################################################################################ diff --git a/clang/lib/CIR/CodeGen/CIRGenExprConstant.cpp b/clang/lib/CIR/CodeGen/CIRGenExprConstant.cpp index ab1ea07bbf5ef..2d8550fad454c 100644 --- a/clang/lib/CIR/CodeGen/CIRGenExprConstant.cpp +++ b/clang/lib/CIR/CodeGen/CIRGenExprConstant.cpp @@ -90,9 +90,10 @@ class ConstExprEmitter } mlir::Attribute VisitCastExpr(CastExpr *e, QualType destType) { - if (const auto *ece = dyn_cast<ExplicitCastExpr>(e)) + if (isa<ExplicitCastExpr>(e)) cgm.errorNYI(e->getBeginLoc(), "ConstExprEmitter::VisitCastExpr explicit cast"); + Expr *subExpr = e->getSubExpr(); switch (e->getCastKind()) { _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits