summaryrefslogtreecommitdiff
path: root/src/ir/utils.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/ir/utils.h')
-rw-r--r--src/ir/utils.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/ir/utils.h b/src/ir/utils.h
index 0136fd11c..424298bb3 100644
--- a/src/ir/utils.h
+++ b/src/ir/utils.h
@@ -222,8 +222,10 @@ struct AutoDrop : public WalkerPass<ExpressionStackWalker<AutoDrop>> {
if (maybeDrop(curr->body)) {
acted = true;
}
- if (maybeDrop(curr->catchBody)) {
- acted = true;
+ for (auto* catchBody : curr->catchBodies) {
+ if (maybeDrop(catchBody)) {
+ acted = true;
+ }
}
if (acted) {
reFinalize();