[Lldb-commits] [lldb] [lldb] Add binary multiplication, division, remainder to DIL (PR #187281)
Michael Buch via lldb-commits
lldb-commits at lists.llvm.org
Sat Apr 11 04:29:58 PDT 2026
================
@@ -98,7 +109,69 @@ def test_arithmetic(self):
# Check references and typedefs
self.expect_var_path("ref + 1", value="3")
self.expect_var_path("ref - 1l", value="1")
+ self.expect_var_path("ref * 2u", value="4")
+ self.expect_var_path("ref / 2ull", value="1")
+ self.expect_var_path("ref % 2", value="0")
self.expect_var_path("my_ref + 1", value="3")
self.expect_var_path("my_ref - 1", value="1")
+ self.expect_var_path("my_ref * 2", value="4")
+ self.expect_var_path("my_ref / 2", value="1")
+ self.expect_var_path("my_ref % 2", value="0")
self.expect_var_path("ref + my_ref", value="4")
self.expect_var_path("ref - my_ref", value="0")
+ self.expect_var_path("ref * my_ref", value="4")
+ self.expect_var_path("ref / my_ref", value="1")
+ self.expect_var_path("ref % my_ref", value="0")
+
+ # Check enums
+ self.expect_var_path("enum_one + 1", value="2")
+ self.expect_var_path("enum_one - 1", value="0")
+ self.expect_var_path("enum_one * 2", value="2")
+ self.expect_var_path("enum_one / 1", value="1")
+ self.expect_var_path("enum_one % 1", value="0")
----------------
Michael137 wrote:
Lets also have some where LHS *and* RHS are both enums
https://github.com/llvm/llvm-project/pull/187281
More information about the lldb-commits
mailing list