llvmbot wrote:

<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-clangir

Author: Amr Hesham (AmrDeveloper)

<details>
<summary>Changes</summary>

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

---
Full diff: https://github.com/llvm/llvm-project/pull/138415.diff


1 Files Affected:

- (modified) clang/lib/CIR/CodeGen/CIRGenExprConstant.cpp (+2-1) 


``````````diff
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()) {

``````````

</details>


https://github.com/llvm/llvm-project/pull/138415
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to