-
Notifications
You must be signed in to change notification settings - Fork 13.3k
[Dexter] Replace clang with clang++ in various cross project tests #65987
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This change looks good by itself, but we may need to additionally sneak in |
That sounds like a good candidate for some kind of system-dependent substitution; though I don't think any of the cross-project-tests right now (including the I also see that some of the tests that were XFAILed before due to greendragon test failures don't make use of |
I tried to add
Weirdly enough, when I run the same command line locally, it seems to work without an issue:
So I am not sure of what is going on |
@@ -2,7 +2,7 @@ | |||
// UNSUPPORTED: system-windows | |||
// XFAIL: system-darwin | |||
// | |||
// RUN: %clang -std=gnu++11 -O0 -g -lstdc++ %s -o %t | |||
// RUN: %clang++ -std=gnu++11 -O0 -g -lstdc++ %s -o %t |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove -lstdc++
Since the issue had nothing to do with clang++, is this change needed? @SLTozer @adrian-prantl |
It's not needed to make the tests pass, but we should probably be invoking the right driver for tests where reasonable, so I think it's still worth landing now that it's done. |
9fcbde6
to
576b057
Compare
@SLTozer Was there a reason why this PR never got merged? |
Fell off my radar - it's not needed to fix any actual problems, it's just slightly better practice. I can't monitor the buildbots right now, but I'll merge it when I'm next able. |
You can test this locally with the following command:git-clang-format --diff HEAD~1 HEAD --extensions cpp,c -- cross-project-tests/debuginfo-tests/dexter-tests/aggregate-indirect-arg.cpp cross-project-tests/debuginfo-tests/dexter-tests/asan-deque.cpp cross-project-tests/debuginfo-tests/dexter-tests/ctor.cpp cross-project-tests/debuginfo-tests/dexter-tests/deferred_globals.cpp cross-project-tests/debuginfo-tests/dexter-tests/namespace.cpp cross-project-tests/debuginfo-tests/dexter-tests/nrvo-string.cpp cross-project-tests/debuginfo-tests/dexter-tests/optnone-fastmath.cpp cross-project-tests/debuginfo-tests/dexter-tests/optnone-loops.cpp cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/penalty/dex_declare_file.cpp cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/penalty/expect_program_state.cpp cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/penalty/expect_step_kinds.cpp cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/penalty/expect_step_order.cpp cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/penalty/expect_watch_type.cpp cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/penalty/expect_watch_value.cpp cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/penalty/float_range_out_range.cpp cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/penalty/float_range_zero_nonmatch.cpp cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/penalty/missing_dex_address.cpp cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/penalty/unreachable.cpp cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/penalty/unreachable_line_range.cpp cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/penalty/unreachable_on_line.cpp cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/command_line.c cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/dex_declare_address/address_after_ref.cpp cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/dex_declare_address/address_hit_count.cpp cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/dex_declare_address/expression_address.cpp cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/dex_declare_address/identical_address.cpp cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/dex_declare_address/multiple_address.cpp cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/dex_declare_address/offset_address.cpp cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/dex_declare_address/self_comparison.cpp cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/dex_declare_file/dex_and_source/test.cpp cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/dex_finish_test/default_conditional.cpp cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/dex_finish_test/default_conditional_hit_count.cpp cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/dex_finish_test/default_hit_count.cpp cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/dex_finish_test/default_simple.cpp cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/dex_finish_test/limit_steps_conditional.cpp cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/dex_finish_test/limit_steps_conditional_hit_count.cpp cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/dex_finish_test/limit_steps_hit_count.cpp cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/dex_finish_test/limit_steps_simple.cpp cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/expect_program_state.cpp cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/expect_step_kind/direction.cpp cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/expect_step_kind/func.cpp cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/expect_step_kind/func_external.cpp cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/expect_step_kind/recursive.cpp cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/expect_step_kind/small_loop.cpp cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/expect_step_order.cpp cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/expect_watch_type.cpp cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/expect_watch_value.cpp cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/float_range_watch/float_range_multiple.cpp cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/float_range_watch/float_range_no_arg.cpp cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/float_range_watch/float_range_small.cpp cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/float_range_watch/float_range_zero_match.cpp cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/limit_steps/hit_count.cpp cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/limit_steps/limit_steps_check_json_step_count.cpp cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/limit_steps/limit_steps_expect_loop.cpp cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/limit_steps/limit_steps_expect_value.cpp cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/limit_steps/limit_steps_line_mismatch.cpp cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/limit_steps/limit_steps_overlapping_ranges.cpp cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/limit_steps/limit_steps_same_line_conditional.cpp cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/limit_steps/unconditional.cpp cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/unreachable.cpp cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/unreachable_not_cmd_lineno.cpp cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/unreachable_on_line.cpp cross-project-tests/debuginfo-tests/dexter/feature_tests/subtools/test/address_printing.cpp cross-project-tests/debuginfo-tests/dexter/feature_tests/subtools/test/err_bad_label_ref.cpp cross-project-tests/debuginfo-tests/dexter/feature_tests/subtools/test/err_duplicate_address.cpp cross-project-tests/debuginfo-tests/dexter/feature_tests/subtools/test/err_duplicate_label.cpp cross-project-tests/debuginfo-tests/dexter/feature_tests/subtools/test/err_paren.cpp cross-project-tests/debuginfo-tests/dexter/feature_tests/subtools/test/err_paren_mline.cpp cross-project-tests/debuginfo-tests/dexter/feature_tests/subtools/test/err_syntax.cpp cross-project-tests/debuginfo-tests/dexter/feature_tests/subtools/test/err_syntax_mline.cpp cross-project-tests/debuginfo-tests/dexter/feature_tests/subtools/test/err_type.cpp cross-project-tests/debuginfo-tests/dexter/feature_tests/subtools/test/err_type_mline.cpp cross-project-tests/debuginfo-tests/dexter/feature_tests/subtools/test/err_undeclared_addr.cpp cross-project-tests/debuginfo-tests/dexter/feature_tests/subtools/test/label_another_line.cpp cross-project-tests/debuginfo-tests/dexter/feature_tests/subtools/test/label_offset.cpp cross-project-tests/debuginfo-tests/dexter/feature_tests/subtools/test/source-root-dir.cpp cross-project-tests/debuginfo-tests/dexter/feature_tests/subtools/test/target_run_args.c cross-project-tests/debuginfo-tests/dexter/feature_tests/subtools/test/target_run_args_with_command.c cross-project-tests/debuginfo-tests/dexter/feature_tests/subtools/view.cpp View the diff from clang-format here.diff --git a/cross-project-tests/debuginfo-tests/dexter-tests/asan-deque.cpp b/cross-project-tests/debuginfo-tests/dexter-tests/asan-deque.cpp
index 08540145d..4f975cc7b 100644
--- a/cross-project-tests/debuginfo-tests/dexter-tests/asan-deque.cpp
+++ b/cross-project-tests/debuginfo-tests/dexter-tests/asan-deque.cpp
@@ -8,7 +8,8 @@
// lldb-8, even outside of dexter, will sometimes trigger an asan fault in
// the debugged process and generally freak out.
-// RUN: %clang++ -std=gnu++11 -O1 -glldb -fsanitize=address -arch x86_64 %s -o %t
+// RUN: %clang++ -std=gnu++11 -O1 -glldb -fsanitize=address -arch x86_64 %s -o
+// %t
// RUN: %dexter --fail-lt 1.0 -w \
// RUN: --binary %t --debugger 'lldb' -- %s
#include <deque>
diff --git a/cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/dex_finish_test/default_simple.cpp b/cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/dex_finish_test/default_simple.cpp
index ee4cf1dec..516ca1d15 100644
--- a/cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/dex_finish_test/default_simple.cpp
+++ b/cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/dex_finish_test/default_simple.cpp
@@ -1,8 +1,8 @@
// Purpose:
// Test that \DexFinishTest can be used without a condition or hit_count,
-// so the test simply exits as soon as the line referenced by \DexFinishTest
-// is stepped on.
-// Tests using the default controller (no \DexLimitSteps).
+// so the test simply exits as soon as the line referenced by
+// \DexFinishTest is stepped on. Tests using the default controller (no
+// \DexLimitSteps).
//
// RUN: %dexter_regression_test_cxx_build %s -o %t
// RUN: %dexter_regression_test_run --binary %t -- %s | FileCheck %s
diff --git a/cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/dex_finish_test/limit_steps_simple.cpp b/cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/dex_finish_test/limit_steps_simple.cpp
index 27505d5a3..7b74b9099 100644
--- a/cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/dex_finish_test/limit_steps_simple.cpp
+++ b/cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/dex_finish_test/limit_steps_simple.cpp
@@ -1,8 +1,8 @@
// Purpose:
// Test that \DexFinishTest can be used without a condition or hit_count,
-// so the test simply exits as soon as the line referenced by \DexFinishTest
-// is stepped on.
-// Test using the conditional controller (using \DexLimitSteps).
+// so the test simply exits as soon as the line referenced by
+// \DexFinishTest is stepped on. Test using the conditional controller
+// (using \DexLimitSteps).
//
// The dbgeng driver doesn't support \DexLimitSteps yet.
// UNSUPPORTED: system-windows, system-darwin
diff --git a/cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/expect_watch_type.cpp b/cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/expect_watch_type.cpp
index ddc5e7cce..f6a646cb8 100644
--- a/cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/expect_watch_type.cpp
+++ b/cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/expect_watch_type.cpp
@@ -4,9 +4,8 @@
//
// UNSUPPORTED: system-darwin
//
-// TODO: On Windows WITH dbgeng, This test takes a long time to run and doesn't evaluate type values
-// in the same manner as LLDB.
-// XFAIL: system-windows
+// TODO: On Windows WITH dbgeng, This test takes a long time to run and doesn't
+// evaluate type values in the same manner as LLDB. XFAIL: system-windows
//
// RUN: %dexter_regression_test_cxx_build %s -o %t
// RUN: %dexter_regression_test_run --binary %t -- %s | FileCheck %s
diff --git a/cross-project-tests/debuginfo-tests/dexter/feature_tests/subtools/test/err_bad_label_ref.cpp b/cross-project-tests/debuginfo-tests/dexter/feature_tests/subtools/test/err_bad_label_ref.cpp
index 0921d7991..5b852ac85 100644
--- a/cross-project-tests/debuginfo-tests/dexter/feature_tests/subtools/test/err_bad_label_ref.cpp
+++ b/cross-project-tests/debuginfo-tests/dexter/feature_tests/subtools/test/err_bad_label_ref.cpp
@@ -2,10 +2,12 @@
// Check that referencing an undefined label gives a useful error message.
//
// RUN: %dexter_regression_test_cxx_build %s -o %t
-// RUN: not %dexter_regression_test_run --binary %t -v -- %s | FileCheck %s --match-full-lines
+// RUN: not %dexter_regression_test_run --binary %t -v -- %s | FileCheck %s
+// --match-full-lines
//
-// CHECK: parser error:{{.*}}err_bad_label_ref.cpp(15): Unresolved label: 'label_does_not_exist'
-// CHECK-NEXT: {{Dex}}ExpectWatchValue('result', '0', on_line=ref('label_does_not_exist'))
+// CHECK: parser error:{{.*}}err_bad_label_ref.cpp(15): Unresolved label:
+// 'label_does_not_exist' CHECK-NEXT: {{Dex}}ExpectWatchValue('result', '0',
+// on_line=ref('label_does_not_exist'))
int main() {
int result = 0;
diff --git a/cross-project-tests/debuginfo-tests/dexter/feature_tests/subtools/test/err_duplicate_address.cpp b/cross-project-tests/debuginfo-tests/dexter/feature_tests/subtools/test/err_duplicate_address.cpp
index 6839360a7..64f44c4b2 100644
--- a/cross-project-tests/debuginfo-tests/dexter/feature_tests/subtools/test/err_duplicate_address.cpp
+++ b/cross-project-tests/debuginfo-tests/dexter/feature_tests/subtools/test/err_duplicate_address.cpp
@@ -2,8 +2,8 @@
// Check that declaring duplicate addresses gives a useful error message.
//
// RUN: %dexter_regression_test_cxx_build %s -o %t
-// RUN: not %dexter_regression_test_run --binary %t -v -- %s | FileCheck %s --match-full-lines
-
+// RUN: not %dexter_regression_test_run --binary %t -v -- %s | FileCheck %s
+// --match-full-lines
int main() {
int *result = new int(0);
diff --git a/cross-project-tests/debuginfo-tests/dexter/feature_tests/subtools/test/err_duplicate_label.cpp b/cross-project-tests/debuginfo-tests/dexter/feature_tests/subtools/test/err_duplicate_label.cpp
index 89d6fb85d..38d98bf54 100644
--- a/cross-project-tests/debuginfo-tests/dexter/feature_tests/subtools/test/err_duplicate_label.cpp
+++ b/cross-project-tests/debuginfo-tests/dexter/feature_tests/subtools/test/err_duplicate_label.cpp
@@ -2,10 +2,11 @@
// Check that defining duplicate labels gives a useful error message.
//
// RUN: %dexter_regression_test_cxx_build %s -o %t
-// RUN: not %dexter_regression_test_run --binary %t -v -- %s | FileCheck %s --match-full-lines
+// RUN: not %dexter_regression_test_run --binary %t -v -- %s | FileCheck %s
+// --match-full-lines
//
-// CHECK: parser error:{{.*}}err_duplicate_label.cpp(12): Found duplicate line label: 'oops'
-// CHECK-NEXT: {{Dex}}Label('oops')
+// CHECK: parser error:{{.*}}err_duplicate_label.cpp(12): Found duplicate line
+// label: 'oops' CHECK-NEXT: {{Dex}}Label('oops')
int main() {
int result = 0; // DexLabel('oops')
diff --git a/cross-project-tests/debuginfo-tests/dexter/feature_tests/subtools/test/err_paren.cpp b/cross-project-tests/debuginfo-tests/dexter/feature_tests/subtools/test/err_paren.cpp
index 5a35b3a51..2eef0aa34 100644
--- a/cross-project-tests/debuginfo-tests/dexter/feature_tests/subtools/test/err_paren.cpp
+++ b/cross-project-tests/debuginfo-tests/dexter/feature_tests/subtools/test/err_paren.cpp
@@ -11,9 +11,8 @@
// RUN: not %dexter_base test --binary %t --debugger 'lldb' \
// RUN: -v -- %s | FileCheck %s --match-full-lines --strict-whitespace
//
-// CHECK:parser error:{{.*}}err_paren.cpp(22): Unbalanced parenthesis starting here
-// CHECK:// {{Dex}}ExpectWatchValue(
-// CHECK: ^
+// CHECK:parser error:{{.*}}err_paren.cpp(22): Unbalanced parenthesis starting
+// here CHECK:// {{Dex}}ExpectWatchValue( CHECK: ^
int main(){
return 0;
diff --git a/cross-project-tests/debuginfo-tests/dexter/feature_tests/subtools/test/err_paren_mline.cpp b/cross-project-tests/debuginfo-tests/dexter/feature_tests/subtools/test/err_paren_mline.cpp
index 0044b3b6e..1cd633ce7 100644
--- a/cross-project-tests/debuginfo-tests/dexter/feature_tests/subtools/test/err_paren_mline.cpp
+++ b/cross-project-tests/debuginfo-tests/dexter/feature_tests/subtools/test/err_paren_mline.cpp
@@ -11,9 +11,8 @@
// RUN: not %dexter_base test --binary %t --debugger "lldb" \
// RUN: -v -- %s | FileCheck %s --match-full-lines --strict-whitespace
//
-// CHECK:parser error:{{.*}}err_paren_mline.cpp(23): Unbalanced parenthesis starting here
-// CHECK:{{Dex}}ExpectWatchValue(
-// CHECK: ^
+// CHECK:parser error:{{.*}}err_paren_mline.cpp(23): Unbalanced parenthesis
+// starting here CHECK:{{Dex}}ExpectWatchValue( CHECK: ^
int main(){
return 0;
diff --git a/cross-project-tests/debuginfo-tests/dexter/feature_tests/subtools/test/err_undeclared_addr.cpp b/cross-project-tests/debuginfo-tests/dexter/feature_tests/subtools/test/err_undeclared_addr.cpp
index 66a5e4625..79bc8da82 100644
--- a/cross-project-tests/debuginfo-tests/dexter/feature_tests/subtools/test/err_undeclared_addr.cpp
+++ b/cross-project-tests/debuginfo-tests/dexter/feature_tests/subtools/test/err_undeclared_addr.cpp
@@ -2,8 +2,8 @@
// Check that using an undeclared address gives a useful error message.
//
// RUN: %dexter_regression_test_cxx_build %s -o %t
-// RUN: not %dexter_regression_test_run --binary %t -v -- %s | FileCheck %s --match-full-lines
-
+// RUN: not %dexter_regression_test_run --binary %t -v -- %s | FileCheck %s
+// --match-full-lines
int main() {
int *result = new int(0);
diff --git a/cross-project-tests/debuginfo-tests/dexter/feature_tests/subtools/test/target_run_args.c b/cross-project-tests/debuginfo-tests/dexter/feature_tests/subtools/test/target_run_args.c
index d8a253e70..d333c81b2 100644
--- a/cross-project-tests/debuginfo-tests/dexter/feature_tests/subtools/test/target_run_args.c
+++ b/cross-project-tests/debuginfo-tests/dexter/feature_tests/subtools/test/target_run_args.c
@@ -2,8 +2,8 @@
// UNSUPPORTED: system-windows
//
// RUN: %dexter_regression_test_c_build %s -o %t
-// RUN: %dexter_regression_test_run --binary %t --target-run-args "a b 'c d'" -- %s | FileCheck %s
-// CHECK: target_run_args.c:
+// RUN: %dexter_regression_test_run --binary %t --target-run-args "a b 'c d'" --
+// %s | FileCheck %s CHECK: target_run_args.c:
int main(int argc, const char **argv) {
if (argc == 4)
diff --git a/cross-project-tests/debuginfo-tests/dexter/feature_tests/subtools/test/target_run_args_with_command.c b/cross-project-tests/debuginfo-tests/dexter/feature_tests/subtools/test/target_run_args_with_command.c
index 1f8ed5f18..688b11a2c 100644
--- a/cross-project-tests/debuginfo-tests/dexter/feature_tests/subtools/test/target_run_args_with_command.c
+++ b/cross-project-tests/debuginfo-tests/dexter/feature_tests/subtools/test/target_run_args_with_command.c
@@ -2,8 +2,8 @@
// UNSUPPORTED: system-windows
//
// RUN: %dexter_regression_test_c_build %s -o %t
-// RUN: %dexter_regression_test_run --binary %t --target-run-args "a b 'c d'" -- %s | FileCheck %s
-// CHECK: target_run_args_with_command.c:
+// RUN: %dexter_regression_test_run --binary %t --target-run-args "a b 'c d'" --
+// %s | FileCheck %s CHECK: target_run_args_with_command.c:
int main(int argc, const char **argv) {
if (argc == 6)
|
This patch attempts to fixup a set of tests in the cross-project-tests directory by replacing invocations of clang with clang++ for a set of c++ files. As a small additional change, this patch removes -lstdc++ from a test that did not appear to require it.
@arsenm I see you've merged main into the branch, which has pinged me yet again on this patch, which I'll merge now; I'm just force-pushing a rebased version of this PR up to get the merge commit out of the branch history - if there was a reason for merging main in other than in preparation for merging this back to main in turn, I can revert the history. |
ac8ce32
to
28a590e
Compare
This patch attempts to fixup a set of tests in the cross-project-tests directory by replacing invocations of clang with clang++ for a set of c++ files.
As a small additional change, this patch removes -lstdc++ from a test that did not appear to require it.