llvmbot wrote:

<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-clang

Author: Andy Kaylor (andykaylor)

<details>
<summary>Changes</summary>

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

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


1 Files Affected:

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


``````````diff
diff --git a/clang/lib/CIR/CodeGen/CIRGenExpr.cpp 
b/clang/lib/CIR/CodeGen/CIRGenExpr.cpp
index fe3f2f5de249c..0a7b3a837ed39 100644
--- a/clang/lib/CIR/CodeGen/CIRGenExpr.cpp
+++ b/clang/lib/CIR/CodeGen/CIRGenExpr.cpp
@@ -35,7 +35,7 @@ Address CIRGenFunction::emitPointerWithAlignment(const Expr 
*expr) {
 
   // Casts:
   if (auto const *ce = dyn_cast<CastExpr>(expr)) {
-    if (auto const *ece = dyn_cast<ExplicitCastExpr>(ce)) {
+    if (isa<ExplicitCastExpr>(ce)) {
       cgm.errorNYI(expr->getSourceRange(),
                    "emitPointerWithAlignment: explicit cast");
       return Address::invalid();

``````````

</details>


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

Reply via email to