[PATCH] D131061: Fix compiler error: init-statements in if/switch.

Johannes Reifferscheid via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 3 02:37:00 PDT 2022


This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG3e9e43b48eb7: Fix compiler error: init-statements in if/switch. (authored by jreiffers).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D131061/new/

https://reviews.llvm.org/D131061

Files:
  llvm/lib/Analysis/ScalarEvolution.cpp


Index: llvm/lib/Analysis/ScalarEvolution.cpp
===================================================================
--- llvm/lib/Analysis/ScalarEvolution.cpp
+++ llvm/lib/Analysis/ScalarEvolution.cpp
@@ -7315,8 +7315,8 @@
         // CreateSCEV calls getNoWrapFlagsFromUB, which under certain conditions
         // requires a SCEV for the LHS.
         if (NewBO->Op && (NewBO->IsNSW || NewBO->IsNUW)) {
-          if (auto *I = dyn_cast<Instruction>(NewBO->Op);
-              I && programUndefinedIfPoison(I)) {
+          auto *I = dyn_cast<Instruction>(NewBO->Op);
+          if (I && programUndefinedIfPoison(I)) {
             Ops.push_back(BO->LHS);
             break;
           }


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D131061.449610.patch
Type: text/x-patch
Size: 688 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220803/abeee29b/attachment.bin>


More information about the llvm-commits mailing list