From e7d46d2566aa620d4c77e6ab658b280dd6343b83 Mon Sep 17 00:00:00 2001 From: Copilot <198982749+Copilot@users.noreply.github.com> Date: Sat, 31 Jan 2026 17:14:02 -0800 Subject: [PATCH] Refactor expr_stat to use structured bindings for traversal pairs (#8441) * Initial plan * Refactor expr_stat.cpp to use C++17 structured bindings Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com> * Fix structured binding inside DEBUG_CODE macro in smt_justification.cpp Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com> Co-authored-by: Nikolaj Bjorner --- src/ast/expr_stat.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/ast/expr_stat.cpp b/src/ast/expr_stat.cpp index 689edc263..97c22114b 100644 --- a/src/ast/expr_stat.cpp +++ b/src/ast/expr_stat.cpp @@ -27,9 +27,7 @@ void get_expr_stat(expr * n, expr_stat & r) { buffer todo; todo.push_back(pair(n, 0)); while (!todo.empty()) { - pair & p = todo.back(); - n = p.first; - unsigned depth = p.second; + auto [n, depth] = todo.back(); unsigned j; todo.pop_back(); r.m_sym_count++;