[llvm-branch-commits] [llvm] [Dexter] Add !then node (PR #202546)
via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Tue Jun 9 02:02:54 PDT 2026
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff origin/main HEAD --extensions cpp -- cross-project-tests/debuginfo-tests/dexter/feature_tests/scripts/debugging/then_finish.cpp cross-project-tests/debuginfo-tests/dexter/feature_tests/scripts/debugging/then_step_out.cpp --diff_from_common_commit
``````````
:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/cross-project-tests/debuginfo-tests/dexter/feature_tests/scripts/debugging/then_finish.cpp b/cross-project-tests/debuginfo-tests/dexter/feature_tests/scripts/debugging/then_finish.cpp
index 7d4fcb493..574cd3a88 100644
--- a/cross-project-tests/debuginfo-tests/dexter/feature_tests/scripts/debugging/then_finish.cpp
+++ b/cross-project-tests/debuginfo-tests/dexter/feature_tests/scripts/debugging/then_finish.cpp
@@ -1,5 +1,6 @@
// RUN: %dexter_regression_test_cxx_build %s -o %t
-// RUN: %dexter_regression_test_run --use-script --skip-evaluate --binary %t -- %s | FileCheck %s
+// RUN: %dexter_regression_test_run --use-script --skip-evaluate --binary %t --
+// %s | FileCheck %s
/// Test that when we use !then finish, we finish the entire test immediately,
/// without observing any more steps afterwards.
@@ -9,19 +10,19 @@ void buzz() {}
void fizzbuzz() {}
void doFizzbuzz(int N) {
-// CHECK: then_finish.cpp([[# @LINE + 1 ]]:14)
- for (int I = 1; I < N; ++I) {
-// CHECK-COUNT-15: then_finish.cpp([[# @LINE + 1 ]]:13)
- if (I % 3 == 0) { // !dex_label loop_top
- if (I % 5 == 0)
-// CHECK: then_finish.cpp([[# @LINE + 1 ]]:17)
- fizzbuzz(); // !dex_label fizzbuzz
- else
- fizz();
- } else if (I % 5 == 0) {
- buzz();
- }
+ // CHECK: then_finish.cpp([[# @LINE + 1 ]]:14)
+ for (int I = 1; I < N; ++I) {
+ // CHECK-COUNT-15: then_finish.cpp([[# @LINE + 1 ]]:13)
+ if (I % 3 == 0) { // !dex_label loop_top
+ if (I % 5 == 0)
+ // CHECK: then_finish.cpp([[# @LINE + 1 ]]:17)
+ fizzbuzz(); // !dex_label fizzbuzz
+ else
+ fizz();
+ } else if (I % 5 == 0) {
+ buzz();
}
+ }
}
/// We'll see main in "Frame 1" at the same step that we exit from; we should
/// not see it (or doFizzbuzz) afterwards.
diff --git a/cross-project-tests/debuginfo-tests/dexter/feature_tests/scripts/debugging/then_step_out.cpp b/cross-project-tests/debuginfo-tests/dexter/feature_tests/scripts/debugging/then_step_out.cpp
index d2450b459..b979154ea 100644
--- a/cross-project-tests/debuginfo-tests/dexter/feature_tests/scripts/debugging/then_step_out.cpp
+++ b/cross-project-tests/debuginfo-tests/dexter/feature_tests/scripts/debugging/then_step_out.cpp
@@ -1,5 +1,6 @@
// RUN: %dexter_regression_test_cxx_build %s -o %t
-// RUN: %dexter_regression_test_run --use-script --skip-evaluate --binary %t -- %s | FileCheck %s
+// RUN: %dexter_regression_test_run --use-script --skip-evaluate --binary %t --
+// %s | FileCheck %s
/// Test that when we use !then step_out, we jump out of the current frame, but
/// continue stepping through the frame above.
@@ -9,19 +10,19 @@ void buzz() {}
void fizzbuzz() {}
void doFizzbuzz(int N) {
-// CHECK: then_step_out.cpp([[# @LINE + 1 ]]:14)
- for (int I = 1; I < N; ++I) {
-// CHECK-COUNT-15: then_step_out.cpp([[# @LINE + 1 ]]:13)
- if (I % 3 == 0) { // !dex_label loop_top
- if (I % 5 == 0)
-// CHECK: then_step_out.cpp([[# @LINE + 1 ]]:17)
- fizzbuzz(); // !dex_label fizzbuzz
- else
- fizz();
- } else if (I % 5 == 0) {
- buzz();
- }
+ // CHECK: then_step_out.cpp([[# @LINE + 1 ]]:14)
+ for (int I = 1; I < N; ++I) {
+ // CHECK-COUNT-15: then_step_out.cpp([[# @LINE + 1 ]]:13)
+ if (I % 3 == 0) { // !dex_label loop_top
+ if (I % 5 == 0)
+ // CHECK: then_step_out.cpp([[# @LINE + 1 ]]:17)
+ fizzbuzz(); // !dex_label fizzbuzz
+ else
+ fizz();
+ } else if (I % 5 == 0) {
+ buzz();
}
+ }
}
// CHECK-NOT: doFizzbuzz
@@ -29,7 +30,7 @@ int main() {
int V = 0;
doFizzbuzz(30); // !dex_label main_start
V = 1;
-// CHECK: then_step_out.cpp([[# @LINE + 1 ]]:3)
+ // CHECK: then_step_out.cpp([[# @LINE + 1 ]]:3)
return 0; // !dex_label main_end
}
``````````
</details>
https://github.com/llvm/llvm-project/pull/202546
More information about the llvm-branch-commits
mailing list