[v3,7/7] More renames in array_operation::evaluate

Message ID 20230829-cleanup-array-op-v3-7-0d0256c6a6ed@adacore.com
State New
Headers
Series Small cleanups in array_operation::evaluate |

Checks

Context Check Description
linaro-tcwg-bot/tcwg_gdb_build--master-aarch64 success Testing passed
linaro-tcwg-bot/tcwg_gdb_build--master-arm success Testing passed
linaro-tcwg-bot/tcwg_gdb_check--master-aarch64 fail Patch failed to apply
linaro-tcwg-bot/tcwg_gdb_check--master-arm fail Patch failed to apply

Commit Message

Tom Tromey Aug. 29, 2023, 6:10 p.m. UTC
  array_operation::evaluate has variables named "tem2" and "tem3".  This
patch replaces one with a better name, and entirely removes the other.

Reviewed-by: John Baldwin <jhb@FreeBSD.org>
---
 gdb/eval.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)
  

Patch

diff --git a/gdb/eval.c b/gdb/eval.c
index 7c955a4e9eb..81b7aa0cb99 100644
--- a/gdb/eval.c
+++ b/gdb/eval.c
@@ -2397,10 +2397,9 @@  array_operation::evaluate (struct type *expect_type,
 			   struct expression *exp,
 			   enum noside noside)
 {
-  int tem2 = std::get<0> (m_storage);
-  int tem3 = std::get<1> (m_storage);
+  const int provided_low_bound = std::get<0> (m_storage);
   const std::vector<operation_up> &in_args = std::get<2> (m_storage);
-  const int nargs = tem3 - tem2 + 1;
+  const int nargs = std::get<1> (m_storage) - provided_low_bound + 1;
   struct type *type = expect_type ? check_typedef (expect_type) : nullptr;
 
   if (expect_type != nullptr
@@ -2515,7 +2514,7 @@  array_operation::evaluate (struct type *expect_type,
 	 objects.  */
       argvec[tem] = in_args[tem]->evaluate_with_coercion (exp, noside);
     }
-  return value_array (tem2, argvec);
+  return value_array (provided_low_bound, argvec);
 }
 
 value *