[llvm-branch-commits] [llvm] [Dexter] Add condition check to state nodes (PR #203847)
Orlando Cazalet-Hyams via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Wed Jun 24 07:17:07 PDT 2026
================
@@ -0,0 +1,53 @@
+// RUN: %dexter_regression_test_cxx_build %s -o %t
+// RUN: %dexter_regression_test_run --use-script --binary %t -- %s \
+// RUN: | FileCheck %s
+
+/// Test that we correctly interpret nested !where+!and nodes during debugging
+/// and evaluation.
+/// With the conditional check, we should observe half the values of I ([0-3]
+/// and [8-11]), and step into `walk` exactly 8 times.
+
+void walk() {} // !dex_label walk
+
+const char *Red = "Red";
+const char *Green = "Green";
+
+int main() {
+ const char *Light = Red;
+ for (int I = 0; I < 16; ++I) {
+ if (I % 8 == 0)
+ Light = Green;
+ else if (I % 4 == 0)
+ Light = Red;
+ walk(); // !dex_label call
+ }
+ return 0;
+}
----------------
OCHyams wrote:
test could probably be slightly simplified, ymmv
https://github.com/llvm/llvm-project/pull/203847
More information about the llvm-branch-commits
mailing list