From ce6e8c8ae5f42eb760a2f542f082f80e7cbf813f Mon Sep 17 00:00:00 2001 From: Ehab Maali <107338078+71iq@users.noreply.github.com> Date: Sat, 7 Nov 2026 23:15:47 +0200 Subject: [PATCH] Lifetime of temporaries in aggregate initialization [EDGcpfe/29057] A temporary created in the initializer of an element of an aggregate was destroyed at the end of that element's initialization, instead of when the initialization of the whole aggregate is complete. Treat the complete braced initialization of an aggregate as one full-expression, including nested aggregate initializers and initializers resumed after parsing was suspended. Add regression tests, including members with nontrivial destructors and exceptions thrown during and after the initialization. gnu/cpp/cpp0x/initlist122, gnu/cpp/init/aggr7-eh and gnu/cpp/init/array12 now pass. --- src/decl_inits.c | 22 ++++++ src/expr.c | 3 + src/lower_init.c | 2 + ...edg-29057-aggregate-temporary-lifetime.txt | 14 ++++ tests/expectations/edg_x86_64/imported.log | 3 - tests/tests/cwg/.cwg3100.rto/default.1.2.txt | 2 +- .../.source_location.rto/default.1.1.txt | 76 +------------------ .../.source_location.rto/default.10.1.txt | 76 +------------------ .../.source_location.rto/default.2.1.txt | 76 +------------------ .../.source_location.rto/default.3.1.txt | 76 +------------------ .../.source_location.rto/default.4.1.txt | 76 +------------------ .../.source_location.rto/default.5.1.txt | 76 +------------------ .../.source_location.rto/default.6.1.txt | 76 +------------------ .../.source_location.rto/default.7.1.txt | 76 +------------------ .../.source_location.rto/default.8.1.txt | 76 +------------------ .../.source_location.rto/default.9.1.txt | 76 +------------------ .../edg_x86_32_cp.1.1.txt | 76 +------------------ .../edg_x86_32_cp.2.1.txt | 76 +------------------ .../edg_x86_32_cp.3.1.txt | 76 +------------------ .../edg_x86_32_cp.6.1.txt | 76 +------------------ .../edg_x86_32_cp.7.1.txt | 76 +------------------ .../edg_x86_32_cp.8.1.txt | 76 +------------------ .../edg_x86_64_cp.1.1.txt | 76 +------------------ .../edg_x86_64_cp.2.1.txt | 76 +------------------ .../edg_x86_64_cp.3.1.txt | 76 +------------------ .../edg_x86_64_cp.6.1.txt | 76 +------------------ .../edg_x86_64_cp.7.1.txt | 76 +------------------ .../edg_x86_64_cp.8.1.txt | 76 +------------------ .../gnu/cpp/init/.array12.rto/default.1.2.txt | 2 +- .../.edg-29057-eh.rto/default.1.1.txt | 1 + .../.edg-29057-eh.rto/default.1.2.txt | 1 + .../.edg-29057-eh.rto/default.2.1.txt | 1 + .../.edg-29057-eh.rto/default.2.2.txt | 1 + .../.edg-29057.rto/default.1.1.txt | 1 + .../.edg-29057.rto/default.1.2.txt | 1 + .../.edg-29057.rto/default.2.1.txt | 1 + .../.edg-29057.rto/default.2.2.txt | 1 + tests/tests/regressions/edg-29057-eh.sft.cpp | 52 +++++++++++++ tests/tests/regressions/edg-29057.sft.cpp | 21 +++++ 39 files changed, 146 insertions(+), 1655 deletions(-) create mode 100644 src/pending_changes/edg-29057-aggregate-temporary-lifetime.txt create mode 100644 tests/tests/regressions/.edg-29057-eh.rto/default.1.1.txt create mode 100644 tests/tests/regressions/.edg-29057-eh.rto/default.1.2.txt create mode 100644 tests/tests/regressions/.edg-29057-eh.rto/default.2.1.txt create mode 100644 tests/tests/regressions/.edg-29057-eh.rto/default.2.2.txt create mode 100644 tests/tests/regressions/.edg-29057.rto/default.1.1.txt create mode 100644 tests/tests/regressions/.edg-29057.rto/default.1.2.txt create mode 100644 tests/tests/regressions/.edg-29057.rto/default.2.1.txt create mode 100644 tests/tests/regressions/.edg-29057.rto/default.2.2.txt create mode 100644 tests/tests/regressions/edg-29057-eh.sft.cpp create mode 100644 tests/tests/regressions/edg-29057.sft.cpp diff --git a/src/decl_inits.c b/src/decl_inits.c index c077697a93..037e570ece 100644 --- a/src/decl_inits.c +++ b/src/decl_inits.c @@ -4704,12 +4704,17 @@ initializer, already copied and substituted. a_routine_ptr dtor_rp = NULL; a_boolean need_to_free_icp_tree = FALSE; a_boolean saved_reduce_backing_expression_use; + an_expr_stack_entry expr_stack_entry, *saved_expr_stack; + a_boolean full_expression; check_assertion(rescan_aggr != NULL || curr_token == tok_lbrace || (dps != NULL && anything_cached(&dps->prescanned_initializer_cache))); saved_reduce_backing_expression_use = reduce_backing_expression_use; dtype = skip_typerefs(dtype); + full_expression = !C_mode() && is->elements_are_full_expressions && + is_aggregate_type(dtype) && + !(dps != NULL && dps->is_struct_binding_decl); if (rescan_aggr != NULL) { /* Rescan. The {...} is provided by the caller in init-component form. */ icp_tree = rescan_aggr; @@ -4728,6 +4733,12 @@ initializer, already copied and substituted. } /* if */ icp = icp_tree; check_assertion(icp != NULL && is_braced_init_component(icp)); + if (full_expression) { + /* All elements share the lifetime of the complete initialization. */ + push_expr_stack_for_initializer(&expr_stack_entry, &saved_expr_stack, + ek_normal, + /*is_full_expr=*/TRUE, dps, is); + } /* if */ is_var_init = dps != NULL && dps->sym != NULL && variable_for_symbol(dps->sym) != NULL; /* The force_dynamic_init flag only applies to the top-level result. */ @@ -4933,6 +4944,17 @@ initializer, already copied and substituted. } /* if */ is->no_diagnostics = saved_no_diagnostics; reduce_backing_expression_use = saved_reduce_backing_expression_use; + if (full_expression) { + if (is->init_dip != NULL) { + wrap_up_dynamic_init_full_expression(is->init_dip); + } else if (is->init_error) { + discard_curr_expr_object_lifetime(); + } else if (is->init_con != NULL) { + wrap_up_constant_full_expression(is->init_con); + } /* if */ + pop_expr_stack_for_initializer(saved_expr_stack, + /*is_full_expr=*/TRUE, dps, is); + } /* if */ } /* braced_initializer */ diff --git a/src/expr.c b/src/expr.c index 1813fd078d..eb5349cc98 100644 --- a/src/expr.c +++ b/src/expr.c @@ -48016,11 +48016,13 @@ free the components prior to prev_icp. an_expr_stack_entry *saved_expr_stack; an_expr_stack_entry expr_stack_entry; an_object_lifetime *saved_object_lifetime = curr_object_lifetime; + a_boolean saved_full_expressions; check_assertion(is_continuation_elem(prev_icp->next)); continuation = prev_icp->next->variant.continuation.state; dps = continuation->decl_parse_state; check_assertion(dps != NULL && dps->init_state.pending_elements); + saved_full_expressions = dps->init_state.elements_are_full_expressions; if (continuation->resumable) { /* Free most init components preceding prev_icp, but keep the first one in case it is useful for diagnostic purposes. */ @@ -48055,6 +48057,7 @@ free the components prior to prev_icp. /*bundle=*/TRUE, &continuation); pop_expr_stack_for_initializer(saved_expr_stack, /*is_full_expr=*/TRUE, dps, (an_init_state *)NULL); + dps->init_state.elements_are_full_expressions = saved_full_expressions; if (continuation != NULL) { /* Parsing was suspended again. Record additional state information to enable a subsequent call to this function. */ diff --git a/src/lower_init.c b/src/lower_init.c index 156d63c8cc..8003cb1cb0 100644 --- a/src/lower_init.c +++ b/src/lower_init.c @@ -11048,6 +11048,8 @@ do_assignment:; /* coverity[uninit_use] */ if ((dip->kind == (a_dynamic_init_kind)dik_nonconstant_aggregate || dip->kind == (a_dynamic_init_kind)dik_lambda) && + /* Inner partial cleanups are handled by add_dyn_init_cleanup. */ + !dip->overlaps_temps_in_inner_lifetime && latest_initialization_on_entry != eff_context->latest_initialization) { /* This is an aggregate for which some partial-aggregate diff --git a/src/pending_changes/edg-29057-aggregate-temporary-lifetime.txt b/src/pending_changes/edg-29057-aggregate-temporary-lifetime.txt new file mode 100644 index 0000000000..3f1cd1d748 --- /dev/null +++ b/src/pending_changes/edg-29057-aggregate-temporary-lifetime.txt @@ -0,0 +1,14 @@ +[GH #458] +Lifetime of temporaries in aggregate initialization + +In C++, a temporary created in the initializer of an element of an aggregate +was destroyed at the end of that element's initialization, instead of at the +end of the full-expression containing the complete initialization. It is now +destroyed when the initialization of the whole aggregate is complete, +including for nested aggregate initializers. For example: + + struct Temp { Temp(); ~Temp(); }; + struct A { A(const Temp&); }; + struct Pair { A a; int b; }; + int f(); + Pair p{A(Temp{}), f()}; // The Temp is now still alive when f is called. diff --git a/tests/expectations/edg_x86_64/imported.log b/tests/expectations/edg_x86_64/imported.log index fbbfdb7f73..5fff45fe6b 100644 --- a/tests/expectations/edg_x86_64/imported.log +++ b/tests/expectations/edg_x86_64/imported.log @@ -6647,7 +6647,6 @@ gnu/cpp/cpp0x/initlist-opt2.sft.cpp:fp:-DTEST_NUMBER=1 --c++11:FAIL: gnu/cpp/cpp0x/initlist-ref1.sft.cpp:fp:-DTEST_NUMBER=1 --c++11:FAIL: gnu/cpp/cpp0x/initlist-ref3.sft.cpp:fp:-DTEST_NUMBER=1 --c++11:FAIL: gnu/cpp/cpp0x/initlist-value4.sft.cpp:fn:-DTEST_NUMBER=1 --c++11:FAIL: -gnu/cpp/cpp0x/initlist122.sft.cpp:rp:-DTEST_NUMBER=1 --c++11:FAIL: gnu/cpp/cpp0x/initlist13.sft.cpp:fp:-DTEST_NUMBER=1 --c++11:FAIL: gnu/cpp/cpp0x/initlist36.sft.cpp:fn:-DTEST_NUMBER=1 --c++11:FAIL: gnu/cpp/cpp0x/initlist55.sft.cpp:s:-DTEST_NUMBER=1 --c++11 -W:SKIPPED: @@ -7725,10 +7724,8 @@ gnu/cpp/inherit/pr97268.sft.cpp:fn:-DTEST_NUMBER=1 --c++11:FAIL: gnu/cpp/inherit/using4.sft.cpp:fn:-DTEST_NUMBER=1:FAIL: gnu/cpp/init/addr-const1.sft.cpp:rp:-DTEST_NUMBER=1:FAIL: gnu/cpp/init/aggr4.sft.cpp:fn:-DTEST_NUMBER=1 --c++11:FAIL: -gnu/cpp/init/aggr7-eh.sft.cpp:rp:-DTEST_NUMBER=1:FAIL: gnu/cpp/init/aggr7-eh2.sft.cpp:rp:-DTEST_NUMBER=1:FAIL: gnu/cpp/init/aggr7-eh3.sft.cpp:rp:-DTEST_NUMBER=1:FAIL: -gnu/cpp/init/array12.sft.cpp:rp:-DTEST_NUMBER=1:FAIL: gnu/cpp/init/array44.sft.cpp:fn:-DTEST_NUMBER=1:FAIL: gnu/cpp/init/brace4.sft.cpp:fn:-DTEST_NUMBER=1:FAIL: gnu/cpp/init/copy3.sft.cpp:rp:-DTEST_NUMBER=1 --c++14:FAIL: diff --git a/tests/tests/cwg/.cwg3100.rto/default.1.2.txt b/tests/tests/cwg/.cwg3100.rto/default.1.2.txt index 75bd071bb8..66029d56b5 100644 --- a/tests/tests/cwg/.cwg3100.rto/default.1.2.txt +++ b/tests/tests/cwg/.cwg3100.rto/default.1.2.txt @@ -1,6 +1,6 @@ ./a.out +~DTemp ~A ~A ~BTemp -~DTemp ~BTemp diff --git a/tests/tests/imported/clang/cpp/SemaCXX/.source_location.rto/default.1.1.txt b/tests/tests/imported/clang/cpp/SemaCXX/.source_location.rto/default.1.1.txt index 86ec8eac6c..4abba54459 100644 --- a/tests/tests/imported/clang/cpp/SemaCXX/.source_location.rto/default.1.1.txt +++ b/tests/tests/imported/clang/cpp/SemaCXX/.source_location.rto/default.1.1.txt @@ -135,80 +135,6 @@ fe_only -DTEST_NUMBER=1 --clang -tused -e 200 --no_wrap_diagnostics --clang_vers check(t.x, " T", 0); ^ -"test_passed.cpp", line 4301: error: static assertion failed with "" - static_assert(b.a.n == 4300, ""); - ^ -"test_passed.cpp", line 4301: note: the final comparison was 4201 == 4300 - static_assert(b.a.n == 4300, ""); - ^ - -"test_passed.cpp", line 4302: error: static assertion failed with "" - static_assert(b.a.n2 == 4300, ""); - ^ -"test_passed.cpp", line 4302: note: the final comparison was 4201 == 4300 - static_assert(b.a.n2 == 4300, ""); - ^ - -"test_passed.cpp", line 4303: error: static assertion failed with "" - static_assert(b.a.info.line() == 4300, ""); - ^ -"test_passed.cpp", line 4303: note: the final comparison was 4201 == 4300 - static_assert(b.a.info.line() == 4300, ""); - ^ - -"test_passed.cpp", line 4304: error: static assertion failed - static_assert(is_equal(b.a.f, "test_passed.cpp")); - ^ - -"test_passed.cpp", line 4305: error: static assertion failed - static_assert(is_equal(b.a.f2, "test_passed.cpp")); - ^ - -"test_passed.cpp", line 4306: error: static assertion failed - static_assert(is_equal(b.a.info.file(), "test_passed.cpp")); - ^ - -"test_func_passed.cpp", line 4401: error: static assertion failed with "" - static_assert(b.a.n == 4400, ""); - ^ -"test_func_passed.cpp", line 4401: note: the final comparison was 4201 == 4400 - static_assert(b.a.n == 4400, ""); - ^ - -"test_func_passed.cpp", line 4402: error: static assertion failed with "" - static_assert(b.a.n2 == 4400, ""); - ^ -"test_func_passed.cpp", line 4402: note: the final comparison was 4201 == 4400 - static_assert(b.a.n2 == 4400, ""); - ^ - -"test_func_passed.cpp", line 4403: error: static assertion failed with "" - static_assert(b.a.info.line() == 4400, ""); - ^ -"test_func_passed.cpp", line 4403: note: the final comparison was 4201 == 4400 - static_assert(b.a.info.line() == 4400, ""); - ^ - -"test_func_passed.cpp", line 4404: error: static assertion failed - static_assert(is_equal(b.a.f, "test_func_passed.cpp")); - ^ - -"test_func_passed.cpp", line 4405: error: static assertion failed - static_assert(is_equal(b.a.f2, "test_func_passed.cpp")); - ^ - -"test_func_passed.cpp", line 4406: error: static assertion failed - static_assert(is_equal(b.a.info.file(), "test_func_passed.cpp")); - ^ - -"test_func_passed.cpp", line 4407: error: static assertion failed - static_assert(is_equal(b.a.func, "test_in_func")); - ^ - -"test_func_passed.cpp", line 4408: error: static assertion failed - static_assert(is_equal(b.a.func2, "test_in_func")); - ^ - "test_func_passed.cpp", line 4409: error: static assertion failed static_assert(is_equal(b.a.info.function(), "bool test_out_of_line_init::test_in_func()")); ^ @@ -239,4 +165,4 @@ fe_only -DTEST_NUMBER=1 --clang -tused -e 200 --no_wrap_diagnostics --clang_vers ^ detected during instantiation of "Pair test_func::test_func_template(T, U) [with T=int, U=SL]" at line 361 -39 errors detected in the compilation of "Test_name.c". +25 errors detected in the compilation of "Test_name.c". diff --git a/tests/tests/imported/clang/cpp/SemaCXX/.source_location.rto/default.10.1.txt b/tests/tests/imported/clang/cpp/SemaCXX/.source_location.rto/default.10.1.txt index 58b77af2e1..f3006b7c73 100644 --- a/tests/tests/imported/clang/cpp/SemaCXX/.source_location.rto/default.10.1.txt +++ b/tests/tests/imported/clang/cpp/SemaCXX/.source_location.rto/default.10.1.txt @@ -145,80 +145,6 @@ fe_only -DTEST_NUMBER=10 --clang -tused -e 200 --no_wrap_diagnostics --clang_ver check(t.x, " T", 0); ^ -"test_passed.cpp", line 4301: error: static assertion failed with "" - static_assert(b.a.n == 4300, ""); - ^ -"test_passed.cpp", line 4301: note: the final comparison was 4201 == 4300 - static_assert(b.a.n == 4300, ""); - ^ - -"test_passed.cpp", line 4302: error: static assertion failed with "" - static_assert(b.a.n2 == 4300, ""); - ^ -"test_passed.cpp", line 4302: note: the final comparison was 4201 == 4300 - static_assert(b.a.n2 == 4300, ""); - ^ - -"test_passed.cpp", line 4303: error: static assertion failed with "" - static_assert(b.a.info.line() == 4300, ""); - ^ -"test_passed.cpp", line 4303: note: the final comparison was 4201 == 4300 - static_assert(b.a.info.line() == 4300, ""); - ^ - -"test_passed.cpp", line 4304: error: static assertion failed - static_assert(is_equal(b.a.f, "test_passed.cpp")); - ^ - -"test_passed.cpp", line 4305: error: static assertion failed - static_assert(is_equal(b.a.f2, "test_passed.cpp")); - ^ - -"test_passed.cpp", line 4306: error: static assertion failed - static_assert(is_equal(b.a.info.file(), "test_passed.cpp")); - ^ - -"test_func_passed.cpp", line 4401: error: static assertion failed with "" - static_assert(b.a.n == 4400, ""); - ^ -"test_func_passed.cpp", line 4401: note: the final comparison was 4201 == 4400 - static_assert(b.a.n == 4400, ""); - ^ - -"test_func_passed.cpp", line 4402: error: static assertion failed with "" - static_assert(b.a.n2 == 4400, ""); - ^ -"test_func_passed.cpp", line 4402: note: the final comparison was 4201 == 4400 - static_assert(b.a.n2 == 4400, ""); - ^ - -"test_func_passed.cpp", line 4403: error: static assertion failed with "" - static_assert(b.a.info.line() == 4400, ""); - ^ -"test_func_passed.cpp", line 4403: note: the final comparison was 4201 == 4400 - static_assert(b.a.info.line() == 4400, ""); - ^ - -"test_func_passed.cpp", line 4404: error: static assertion failed - static_assert(is_equal(b.a.f, "test_func_passed.cpp")); - ^ - -"test_func_passed.cpp", line 4405: error: static assertion failed - static_assert(is_equal(b.a.f2, "test_func_passed.cpp")); - ^ - -"test_func_passed.cpp", line 4406: error: static assertion failed - static_assert(is_equal(b.a.info.file(), "test_func_passed.cpp")); - ^ - -"test_func_passed.cpp", line 4407: error: static assertion failed - static_assert(is_equal(b.a.func, "test_in_func")); - ^ - -"test_func_passed.cpp", line 4408: error: static assertion failed - static_assert(is_equal(b.a.func2, "test_in_func")); - ^ - "test_func_passed.cpp", line 4409: error: static assertion failed static_assert(is_equal(b.a.info.function(), "bool test_out_of_line_init::test_in_func()")); ^ @@ -286,4 +212,4 @@ fe_only -DTEST_NUMBER=10 --clang -tused -e 200 --no_wrap_diagnostics --clang_ver ^ detected during instantiation of "void test_func::inner::C::df(double) [with Ty=test_func::A, T=void]" at line 496 -47 errors detected in the compilation of "Test_name.c". +33 errors detected in the compilation of "Test_name.c". diff --git a/tests/tests/imported/clang/cpp/SemaCXX/.source_location.rto/default.2.1.txt b/tests/tests/imported/clang/cpp/SemaCXX/.source_location.rto/default.2.1.txt index a00eadd4c9..adcaafd9e2 100644 --- a/tests/tests/imported/clang/cpp/SemaCXX/.source_location.rto/default.2.1.txt +++ b/tests/tests/imported/clang/cpp/SemaCXX/.source_location.rto/default.2.1.txt @@ -135,80 +135,6 @@ fe_only -DTEST_NUMBER=2 --clang -tused -e 200 --no_wrap_diagnostics --clang_vers check(t.x, " T", 0); ^ -"test_passed.cpp", line 4301: error: static assertion failed with "" - static_assert(b.a.n == 4300, ""); - ^ -"test_passed.cpp", line 4301: note: the final comparison was 4201 == 4300 - static_assert(b.a.n == 4300, ""); - ^ - -"test_passed.cpp", line 4302: error: static assertion failed with "" - static_assert(b.a.n2 == 4300, ""); - ^ -"test_passed.cpp", line 4302: note: the final comparison was 4201 == 4300 - static_assert(b.a.n2 == 4300, ""); - ^ - -"test_passed.cpp", line 4303: error: static assertion failed with "" - static_assert(b.a.info.line() == 4300, ""); - ^ -"test_passed.cpp", line 4303: note: the final comparison was 4201 == 4300 - static_assert(b.a.info.line() == 4300, ""); - ^ - -"test_passed.cpp", line 4304: error: static assertion failed - static_assert(is_equal(b.a.f, "test_passed.cpp")); - ^ - -"test_passed.cpp", line 4305: error: static assertion failed - static_assert(is_equal(b.a.f2, "test_passed.cpp")); - ^ - -"test_passed.cpp", line 4306: error: static assertion failed - static_assert(is_equal(b.a.info.file(), "test_passed.cpp")); - ^ - -"test_func_passed.cpp", line 4401: error: static assertion failed with "" - static_assert(b.a.n == 4400, ""); - ^ -"test_func_passed.cpp", line 4401: note: the final comparison was 4201 == 4400 - static_assert(b.a.n == 4400, ""); - ^ - -"test_func_passed.cpp", line 4402: error: static assertion failed with "" - static_assert(b.a.n2 == 4400, ""); - ^ -"test_func_passed.cpp", line 4402: note: the final comparison was 4201 == 4400 - static_assert(b.a.n2 == 4400, ""); - ^ - -"test_func_passed.cpp", line 4403: error: static assertion failed with "" - static_assert(b.a.info.line() == 4400, ""); - ^ -"test_func_passed.cpp", line 4403: note: the final comparison was 4201 == 4400 - static_assert(b.a.info.line() == 4400, ""); - ^ - -"test_func_passed.cpp", line 4404: error: static assertion failed - static_assert(is_equal(b.a.f, "test_func_passed.cpp")); - ^ - -"test_func_passed.cpp", line 4405: error: static assertion failed - static_assert(is_equal(b.a.f2, "test_func_passed.cpp")); - ^ - -"test_func_passed.cpp", line 4406: error: static assertion failed - static_assert(is_equal(b.a.info.file(), "test_func_passed.cpp")); - ^ - -"test_func_passed.cpp", line 4407: error: static assertion failed - static_assert(is_equal(b.a.func, "test_in_func")); - ^ - -"test_func_passed.cpp", line 4408: error: static assertion failed - static_assert(is_equal(b.a.func2, "test_in_func")); - ^ - "test_func_passed.cpp", line 4409: error: static assertion failed static_assert(is_equal(b.a.info.function(), "bool test_out_of_line_init::test_in_func()")); ^ @@ -239,4 +165,4 @@ fe_only -DTEST_NUMBER=2 --clang -tused -e 200 --no_wrap_diagnostics --clang_vers ^ detected during instantiation of "Pair test_func::test_func_template(T, U) [with T=int, U=SL]" at line 361 -39 errors detected in the compilation of "Test_name.c". +25 errors detected in the compilation of "Test_name.c". diff --git a/tests/tests/imported/clang/cpp/SemaCXX/.source_location.rto/default.3.1.txt b/tests/tests/imported/clang/cpp/SemaCXX/.source_location.rto/default.3.1.txt index d415256cb0..37956d4107 100644 --- a/tests/tests/imported/clang/cpp/SemaCXX/.source_location.rto/default.3.1.txt +++ b/tests/tests/imported/clang/cpp/SemaCXX/.source_location.rto/default.3.1.txt @@ -135,80 +135,6 @@ fe_only -DTEST_NUMBER=3 --clang -tused -e 200 --no_wrap_diagnostics --clang_vers check(t.x, " T", 0); ^ -"test_passed.cpp", line 4301: error: static assertion failed with "" - static_assert(b.a.n == 4300, ""); - ^ -"test_passed.cpp", line 4301: note: the final comparison was 4201 == 4300 - static_assert(b.a.n == 4300, ""); - ^ - -"test_passed.cpp", line 4302: error: static assertion failed with "" - static_assert(b.a.n2 == 4300, ""); - ^ -"test_passed.cpp", line 4302: note: the final comparison was 4201 == 4300 - static_assert(b.a.n2 == 4300, ""); - ^ - -"test_passed.cpp", line 4303: error: static assertion failed with "" - static_assert(b.a.info.line() == 4300, ""); - ^ -"test_passed.cpp", line 4303: note: the final comparison was 4201 == 4300 - static_assert(b.a.info.line() == 4300, ""); - ^ - -"test_passed.cpp", line 4304: error: static assertion failed - static_assert(is_equal(b.a.f, "test_passed.cpp")); - ^ - -"test_passed.cpp", line 4305: error: static assertion failed - static_assert(is_equal(b.a.f2, "test_passed.cpp")); - ^ - -"test_passed.cpp", line 4306: error: static assertion failed - static_assert(is_equal(b.a.info.file(), "test_passed.cpp")); - ^ - -"test_func_passed.cpp", line 4401: error: static assertion failed with "" - static_assert(b.a.n == 4400, ""); - ^ -"test_func_passed.cpp", line 4401: note: the final comparison was 4201 == 4400 - static_assert(b.a.n == 4400, ""); - ^ - -"test_func_passed.cpp", line 4402: error: static assertion failed with "" - static_assert(b.a.n2 == 4400, ""); - ^ -"test_func_passed.cpp", line 4402: note: the final comparison was 4201 == 4400 - static_assert(b.a.n2 == 4400, ""); - ^ - -"test_func_passed.cpp", line 4403: error: static assertion failed with "" - static_assert(b.a.info.line() == 4400, ""); - ^ -"test_func_passed.cpp", line 4403: note: the final comparison was 4201 == 4400 - static_assert(b.a.info.line() == 4400, ""); - ^ - -"test_func_passed.cpp", line 4404: error: static assertion failed - static_assert(is_equal(b.a.f, "test_func_passed.cpp")); - ^ - -"test_func_passed.cpp", line 4405: error: static assertion failed - static_assert(is_equal(b.a.f2, "test_func_passed.cpp")); - ^ - -"test_func_passed.cpp", line 4406: error: static assertion failed - static_assert(is_equal(b.a.info.file(), "test_func_passed.cpp")); - ^ - -"test_func_passed.cpp", line 4407: error: static assertion failed - static_assert(is_equal(b.a.func, "test_in_func")); - ^ - -"test_func_passed.cpp", line 4408: error: static assertion failed - static_assert(is_equal(b.a.func2, "test_in_func")); - ^ - "test_func_passed.cpp", line 4409: error: static assertion failed static_assert(is_equal(b.a.info.function(), "bool test_out_of_line_init::test_in_func()")); ^ @@ -239,4 +165,4 @@ fe_only -DTEST_NUMBER=3 --clang -tused -e 200 --no_wrap_diagnostics --clang_vers ^ detected during instantiation of "Pair test_func::test_func_template(T, U) [with T=int, U=SL]" at line 361 -39 errors detected in the compilation of "Test_name.c". +25 errors detected in the compilation of "Test_name.c". diff --git a/tests/tests/imported/clang/cpp/SemaCXX/.source_location.rto/default.4.1.txt b/tests/tests/imported/clang/cpp/SemaCXX/.source_location.rto/default.4.1.txt index b4e8d67e33..65c5eaa91d 100644 --- a/tests/tests/imported/clang/cpp/SemaCXX/.source_location.rto/default.4.1.txt +++ b/tests/tests/imported/clang/cpp/SemaCXX/.source_location.rto/default.4.1.txt @@ -145,80 +145,6 @@ fe_only -DTEST_NUMBER=4 --clang -tused -e 200 --no_wrap_diagnostics --clang_vers check(t.x, " T", 0); ^ -"test_passed.cpp", line 4301: error: static assertion failed with "" - static_assert(b.a.n == 4300, ""); - ^ -"test_passed.cpp", line 4301: note: the final comparison was 4201 == 4300 - static_assert(b.a.n == 4300, ""); - ^ - -"test_passed.cpp", line 4302: error: static assertion failed with "" - static_assert(b.a.n2 == 4300, ""); - ^ -"test_passed.cpp", line 4302: note: the final comparison was 4201 == 4300 - static_assert(b.a.n2 == 4300, ""); - ^ - -"test_passed.cpp", line 4303: error: static assertion failed with "" - static_assert(b.a.info.line() == 4300, ""); - ^ -"test_passed.cpp", line 4303: note: the final comparison was 4201 == 4300 - static_assert(b.a.info.line() == 4300, ""); - ^ - -"test_passed.cpp", line 4304: error: static assertion failed - static_assert(is_equal(b.a.f, "test_passed.cpp")); - ^ - -"test_passed.cpp", line 4305: error: static assertion failed - static_assert(is_equal(b.a.f2, "test_passed.cpp")); - ^ - -"test_passed.cpp", line 4306: error: static assertion failed - static_assert(is_equal(b.a.info.file(), "test_passed.cpp")); - ^ - -"test_func_passed.cpp", line 4401: error: static assertion failed with "" - static_assert(b.a.n == 4400, ""); - ^ -"test_func_passed.cpp", line 4401: note: the final comparison was 4201 == 4400 - static_assert(b.a.n == 4400, ""); - ^ - -"test_func_passed.cpp", line 4402: error: static assertion failed with "" - static_assert(b.a.n2 == 4400, ""); - ^ -"test_func_passed.cpp", line 4402: note: the final comparison was 4201 == 4400 - static_assert(b.a.n2 == 4400, ""); - ^ - -"test_func_passed.cpp", line 4403: error: static assertion failed with "" - static_assert(b.a.info.line() == 4400, ""); - ^ -"test_func_passed.cpp", line 4403: note: the final comparison was 4201 == 4400 - static_assert(b.a.info.line() == 4400, ""); - ^ - -"test_func_passed.cpp", line 4404: error: static assertion failed - static_assert(is_equal(b.a.f, "test_func_passed.cpp")); - ^ - -"test_func_passed.cpp", line 4405: error: static assertion failed - static_assert(is_equal(b.a.f2, "test_func_passed.cpp")); - ^ - -"test_func_passed.cpp", line 4406: error: static assertion failed - static_assert(is_equal(b.a.info.file(), "test_func_passed.cpp")); - ^ - -"test_func_passed.cpp", line 4407: error: static assertion failed - static_assert(is_equal(b.a.func, "test_in_func")); - ^ - -"test_func_passed.cpp", line 4408: error: static assertion failed - static_assert(is_equal(b.a.func2, "test_in_func")); - ^ - "test_func_passed.cpp", line 4409: error: static assertion failed static_assert(is_equal(b.a.info.function(), "bool test_out_of_line_init::test_in_func()")); ^ @@ -286,4 +212,4 @@ fe_only -DTEST_NUMBER=4 --clang -tused -e 200 --no_wrap_diagnostics --clang_vers ^ detected during instantiation of "void test_func::inner::C::df(double) [with Ty=test_func::A, T=void]" at line 496 -47 errors detected in the compilation of "Test_name.c". +33 errors detected in the compilation of "Test_name.c". diff --git a/tests/tests/imported/clang/cpp/SemaCXX/.source_location.rto/default.5.1.txt b/tests/tests/imported/clang/cpp/SemaCXX/.source_location.rto/default.5.1.txt index 9b3a980503..b625e940ec 100644 --- a/tests/tests/imported/clang/cpp/SemaCXX/.source_location.rto/default.5.1.txt +++ b/tests/tests/imported/clang/cpp/SemaCXX/.source_location.rto/default.5.1.txt @@ -145,80 +145,6 @@ fe_only -DTEST_NUMBER=5 --clang -tused -e 200 --no_wrap_diagnostics --clang_vers check(t.x, " T", 0); ^ -"test_passed.cpp", line 4301: error: static assertion failed with "" - static_assert(b.a.n == 4300, ""); - ^ -"test_passed.cpp", line 4301: note: the final comparison was 4201 == 4300 - static_assert(b.a.n == 4300, ""); - ^ - -"test_passed.cpp", line 4302: error: static assertion failed with "" - static_assert(b.a.n2 == 4300, ""); - ^ -"test_passed.cpp", line 4302: note: the final comparison was 4201 == 4300 - static_assert(b.a.n2 == 4300, ""); - ^ - -"test_passed.cpp", line 4303: error: static assertion failed with "" - static_assert(b.a.info.line() == 4300, ""); - ^ -"test_passed.cpp", line 4303: note: the final comparison was 4201 == 4300 - static_assert(b.a.info.line() == 4300, ""); - ^ - -"test_passed.cpp", line 4304: error: static assertion failed - static_assert(is_equal(b.a.f, "test_passed.cpp")); - ^ - -"test_passed.cpp", line 4305: error: static assertion failed - static_assert(is_equal(b.a.f2, "test_passed.cpp")); - ^ - -"test_passed.cpp", line 4306: error: static assertion failed - static_assert(is_equal(b.a.info.file(), "test_passed.cpp")); - ^ - -"test_func_passed.cpp", line 4401: error: static assertion failed with "" - static_assert(b.a.n == 4400, ""); - ^ -"test_func_passed.cpp", line 4401: note: the final comparison was 4201 == 4400 - static_assert(b.a.n == 4400, ""); - ^ - -"test_func_passed.cpp", line 4402: error: static assertion failed with "" - static_assert(b.a.n2 == 4400, ""); - ^ -"test_func_passed.cpp", line 4402: note: the final comparison was 4201 == 4400 - static_assert(b.a.n2 == 4400, ""); - ^ - -"test_func_passed.cpp", line 4403: error: static assertion failed with "" - static_assert(b.a.info.line() == 4400, ""); - ^ -"test_func_passed.cpp", line 4403: note: the final comparison was 4201 == 4400 - static_assert(b.a.info.line() == 4400, ""); - ^ - -"test_func_passed.cpp", line 4404: error: static assertion failed - static_assert(is_equal(b.a.f, "test_func_passed.cpp")); - ^ - -"test_func_passed.cpp", line 4405: error: static assertion failed - static_assert(is_equal(b.a.f2, "test_func_passed.cpp")); - ^ - -"test_func_passed.cpp", line 4406: error: static assertion failed - static_assert(is_equal(b.a.info.file(), "test_func_passed.cpp")); - ^ - -"test_func_passed.cpp", line 4407: error: static assertion failed - static_assert(is_equal(b.a.func, "test_in_func")); - ^ - -"test_func_passed.cpp", line 4408: error: static assertion failed - static_assert(is_equal(b.a.func2, "test_in_func")); - ^ - "test_func_passed.cpp", line 4409: error: static assertion failed static_assert(is_equal(b.a.info.function(), "bool test_out_of_line_init::test_in_func()")); ^ @@ -286,4 +212,4 @@ fe_only -DTEST_NUMBER=5 --clang -tused -e 200 --no_wrap_diagnostics --clang_vers ^ detected during instantiation of "void test_func::inner::C::df(double) [with Ty=test_func::A, T=void]" at line 496 -47 errors detected in the compilation of "Test_name.c". +33 errors detected in the compilation of "Test_name.c". diff --git a/tests/tests/imported/clang/cpp/SemaCXX/.source_location.rto/default.6.1.txt b/tests/tests/imported/clang/cpp/SemaCXX/.source_location.rto/default.6.1.txt index 4856d65c56..0dc78b5fb2 100644 --- a/tests/tests/imported/clang/cpp/SemaCXX/.source_location.rto/default.6.1.txt +++ b/tests/tests/imported/clang/cpp/SemaCXX/.source_location.rto/default.6.1.txt @@ -135,80 +135,6 @@ fe_only -DTEST_NUMBER=6 --clang -tused -e 200 --no_wrap_diagnostics --clang_vers check(t.x, " T", 0); ^ -"test_passed.cpp", line 4301: error: static assertion failed with "" - static_assert(b.a.n == 4300, ""); - ^ -"test_passed.cpp", line 4301: note: the final comparison was 4201 == 4300 - static_assert(b.a.n == 4300, ""); - ^ - -"test_passed.cpp", line 4302: error: static assertion failed with "" - static_assert(b.a.n2 == 4300, ""); - ^ -"test_passed.cpp", line 4302: note: the final comparison was 4201 == 4300 - static_assert(b.a.n2 == 4300, ""); - ^ - -"test_passed.cpp", line 4303: error: static assertion failed with "" - static_assert(b.a.info.line() == 4300, ""); - ^ -"test_passed.cpp", line 4303: note: the final comparison was 4201 == 4300 - static_assert(b.a.info.line() == 4300, ""); - ^ - -"test_passed.cpp", line 4304: error: static assertion failed - static_assert(is_equal(b.a.f, "test_passed.cpp")); - ^ - -"test_passed.cpp", line 4305: error: static assertion failed - static_assert(is_equal(b.a.f2, "test_passed.cpp")); - ^ - -"test_passed.cpp", line 4306: error: static assertion failed - static_assert(is_equal(b.a.info.file(), "test_passed.cpp")); - ^ - -"test_func_passed.cpp", line 4401: error: static assertion failed with "" - static_assert(b.a.n == 4400, ""); - ^ -"test_func_passed.cpp", line 4401: note: the final comparison was 4201 == 4400 - static_assert(b.a.n == 4400, ""); - ^ - -"test_func_passed.cpp", line 4402: error: static assertion failed with "" - static_assert(b.a.n2 == 4400, ""); - ^ -"test_func_passed.cpp", line 4402: note: the final comparison was 4201 == 4400 - static_assert(b.a.n2 == 4400, ""); - ^ - -"test_func_passed.cpp", line 4403: error: static assertion failed with "" - static_assert(b.a.info.line() == 4400, ""); - ^ -"test_func_passed.cpp", line 4403: note: the final comparison was 4201 == 4400 - static_assert(b.a.info.line() == 4400, ""); - ^ - -"test_func_passed.cpp", line 4404: error: static assertion failed - static_assert(is_equal(b.a.f, "test_func_passed.cpp")); - ^ - -"test_func_passed.cpp", line 4405: error: static assertion failed - static_assert(is_equal(b.a.f2, "test_func_passed.cpp")); - ^ - -"test_func_passed.cpp", line 4406: error: static assertion failed - static_assert(is_equal(b.a.info.file(), "test_func_passed.cpp")); - ^ - -"test_func_passed.cpp", line 4407: error: static assertion failed - static_assert(is_equal(b.a.func, "test_in_func")); - ^ - -"test_func_passed.cpp", line 4408: error: static assertion failed - static_assert(is_equal(b.a.func2, "test_in_func")); - ^ - "test_func_passed.cpp", line 4409: error: static assertion failed static_assert(is_equal(b.a.info.function(), "bool test_out_of_line_init::test_in_func()")); ^ @@ -239,4 +165,4 @@ fe_only -DTEST_NUMBER=6 --clang -tused -e 200 --no_wrap_diagnostics --clang_vers ^ detected during instantiation of "Pair test_func::test_func_template(T, U) [with T=int, U=SL]" at line 361 -39 errors detected in the compilation of "Test_name.c". +25 errors detected in the compilation of "Test_name.c". diff --git a/tests/tests/imported/clang/cpp/SemaCXX/.source_location.rto/default.7.1.txt b/tests/tests/imported/clang/cpp/SemaCXX/.source_location.rto/default.7.1.txt index 48ba7baae5..75a8839b6e 100644 --- a/tests/tests/imported/clang/cpp/SemaCXX/.source_location.rto/default.7.1.txt +++ b/tests/tests/imported/clang/cpp/SemaCXX/.source_location.rto/default.7.1.txt @@ -135,80 +135,6 @@ fe_only -DTEST_NUMBER=7 --clang -tused -e 200 --no_wrap_diagnostics --clang_vers check(t.x, " T", 0); ^ -"test_passed.cpp", line 4301: error: static assertion failed with "" - static_assert(b.a.n == 4300, ""); - ^ -"test_passed.cpp", line 4301: note: the final comparison was 4201 == 4300 - static_assert(b.a.n == 4300, ""); - ^ - -"test_passed.cpp", line 4302: error: static assertion failed with "" - static_assert(b.a.n2 == 4300, ""); - ^ -"test_passed.cpp", line 4302: note: the final comparison was 4201 == 4300 - static_assert(b.a.n2 == 4300, ""); - ^ - -"test_passed.cpp", line 4303: error: static assertion failed with "" - static_assert(b.a.info.line() == 4300, ""); - ^ -"test_passed.cpp", line 4303: note: the final comparison was 4201 == 4300 - static_assert(b.a.info.line() == 4300, ""); - ^ - -"test_passed.cpp", line 4304: error: static assertion failed - static_assert(is_equal(b.a.f, "test_passed.cpp")); - ^ - -"test_passed.cpp", line 4305: error: static assertion failed - static_assert(is_equal(b.a.f2, "test_passed.cpp")); - ^ - -"test_passed.cpp", line 4306: error: static assertion failed - static_assert(is_equal(b.a.info.file(), "test_passed.cpp")); - ^ - -"test_func_passed.cpp", line 4401: error: static assertion failed with "" - static_assert(b.a.n == 4400, ""); - ^ -"test_func_passed.cpp", line 4401: note: the final comparison was 4201 == 4400 - static_assert(b.a.n == 4400, ""); - ^ - -"test_func_passed.cpp", line 4402: error: static assertion failed with "" - static_assert(b.a.n2 == 4400, ""); - ^ -"test_func_passed.cpp", line 4402: note: the final comparison was 4201 == 4400 - static_assert(b.a.n2 == 4400, ""); - ^ - -"test_func_passed.cpp", line 4403: error: static assertion failed with "" - static_assert(b.a.info.line() == 4400, ""); - ^ -"test_func_passed.cpp", line 4403: note: the final comparison was 4201 == 4400 - static_assert(b.a.info.line() == 4400, ""); - ^ - -"test_func_passed.cpp", line 4404: error: static assertion failed - static_assert(is_equal(b.a.f, "test_func_passed.cpp")); - ^ - -"test_func_passed.cpp", line 4405: error: static assertion failed - static_assert(is_equal(b.a.f2, "test_func_passed.cpp")); - ^ - -"test_func_passed.cpp", line 4406: error: static assertion failed - static_assert(is_equal(b.a.info.file(), "test_func_passed.cpp")); - ^ - -"test_func_passed.cpp", line 4407: error: static assertion failed - static_assert(is_equal(b.a.func, "test_in_func")); - ^ - -"test_func_passed.cpp", line 4408: error: static assertion failed - static_assert(is_equal(b.a.func2, "test_in_func")); - ^ - "test_func_passed.cpp", line 4409: error: static assertion failed static_assert(is_equal(b.a.info.function(), "bool test_out_of_line_init::test_in_func()")); ^ @@ -239,4 +165,4 @@ fe_only -DTEST_NUMBER=7 --clang -tused -e 200 --no_wrap_diagnostics --clang_vers ^ detected during instantiation of "Pair test_func::test_func_template(T, U) [with T=int, U=SL]" at line 361 -39 errors detected in the compilation of "Test_name.c". +25 errors detected in the compilation of "Test_name.c". diff --git a/tests/tests/imported/clang/cpp/SemaCXX/.source_location.rto/default.8.1.txt b/tests/tests/imported/clang/cpp/SemaCXX/.source_location.rto/default.8.1.txt index b34904a703..f6082202d8 100644 --- a/tests/tests/imported/clang/cpp/SemaCXX/.source_location.rto/default.8.1.txt +++ b/tests/tests/imported/clang/cpp/SemaCXX/.source_location.rto/default.8.1.txt @@ -135,80 +135,6 @@ fe_only -DTEST_NUMBER=8 --clang -tused -e 200 --no_wrap_diagnostics --clang_vers check(t.x, " T", 0); ^ -"test_passed.cpp", line 4301: error: static assertion failed with "" - static_assert(b.a.n == 4300, ""); - ^ -"test_passed.cpp", line 4301: note: the final comparison was 4201 == 4300 - static_assert(b.a.n == 4300, ""); - ^ - -"test_passed.cpp", line 4302: error: static assertion failed with "" - static_assert(b.a.n2 == 4300, ""); - ^ -"test_passed.cpp", line 4302: note: the final comparison was 4201 == 4300 - static_assert(b.a.n2 == 4300, ""); - ^ - -"test_passed.cpp", line 4303: error: static assertion failed with "" - static_assert(b.a.info.line() == 4300, ""); - ^ -"test_passed.cpp", line 4303: note: the final comparison was 4201 == 4300 - static_assert(b.a.info.line() == 4300, ""); - ^ - -"test_passed.cpp", line 4304: error: static assertion failed - static_assert(is_equal(b.a.f, "test_passed.cpp")); - ^ - -"test_passed.cpp", line 4305: error: static assertion failed - static_assert(is_equal(b.a.f2, "test_passed.cpp")); - ^ - -"test_passed.cpp", line 4306: error: static assertion failed - static_assert(is_equal(b.a.info.file(), "test_passed.cpp")); - ^ - -"test_func_passed.cpp", line 4401: error: static assertion failed with "" - static_assert(b.a.n == 4400, ""); - ^ -"test_func_passed.cpp", line 4401: note: the final comparison was 4201 == 4400 - static_assert(b.a.n == 4400, ""); - ^ - -"test_func_passed.cpp", line 4402: error: static assertion failed with "" - static_assert(b.a.n2 == 4400, ""); - ^ -"test_func_passed.cpp", line 4402: note: the final comparison was 4201 == 4400 - static_assert(b.a.n2 == 4400, ""); - ^ - -"test_func_passed.cpp", line 4403: error: static assertion failed with "" - static_assert(b.a.info.line() == 4400, ""); - ^ -"test_func_passed.cpp", line 4403: note: the final comparison was 4201 == 4400 - static_assert(b.a.info.line() == 4400, ""); - ^ - -"test_func_passed.cpp", line 4404: error: static assertion failed - static_assert(is_equal(b.a.f, "test_func_passed.cpp")); - ^ - -"test_func_passed.cpp", line 4405: error: static assertion failed - static_assert(is_equal(b.a.f2, "test_func_passed.cpp")); - ^ - -"test_func_passed.cpp", line 4406: error: static assertion failed - static_assert(is_equal(b.a.info.file(), "test_func_passed.cpp")); - ^ - -"test_func_passed.cpp", line 4407: error: static assertion failed - static_assert(is_equal(b.a.func, "test_in_func")); - ^ - -"test_func_passed.cpp", line 4408: error: static assertion failed - static_assert(is_equal(b.a.func2, "test_in_func")); - ^ - "test_func_passed.cpp", line 4409: error: static assertion failed static_assert(is_equal(b.a.info.function(), "bool test_out_of_line_init::test_in_func()")); ^ @@ -239,4 +165,4 @@ fe_only -DTEST_NUMBER=8 --clang -tused -e 200 --no_wrap_diagnostics --clang_vers ^ detected during instantiation of "Pair test_func::test_func_template(T, U) [with T=int, U=SL]" at line 361 -39 errors detected in the compilation of "Test_name.c". +25 errors detected in the compilation of "Test_name.c". diff --git a/tests/tests/imported/clang/cpp/SemaCXX/.source_location.rto/default.9.1.txt b/tests/tests/imported/clang/cpp/SemaCXX/.source_location.rto/default.9.1.txt index b55334ca87..80b24f4825 100644 --- a/tests/tests/imported/clang/cpp/SemaCXX/.source_location.rto/default.9.1.txt +++ b/tests/tests/imported/clang/cpp/SemaCXX/.source_location.rto/default.9.1.txt @@ -145,80 +145,6 @@ fe_only -DTEST_NUMBER=9 --clang -tused -e 200 --no_wrap_diagnostics --clang_vers check(t.x, " T", 0); ^ -"test_passed.cpp", line 4301: error: static assertion failed with "" - static_assert(b.a.n == 4300, ""); - ^ -"test_passed.cpp", line 4301: note: the final comparison was 4201 == 4300 - static_assert(b.a.n == 4300, ""); - ^ - -"test_passed.cpp", line 4302: error: static assertion failed with "" - static_assert(b.a.n2 == 4300, ""); - ^ -"test_passed.cpp", line 4302: note: the final comparison was 4201 == 4300 - static_assert(b.a.n2 == 4300, ""); - ^ - -"test_passed.cpp", line 4303: error: static assertion failed with "" - static_assert(b.a.info.line() == 4300, ""); - ^ -"test_passed.cpp", line 4303: note: the final comparison was 4201 == 4300 - static_assert(b.a.info.line() == 4300, ""); - ^ - -"test_passed.cpp", line 4304: error: static assertion failed - static_assert(is_equal(b.a.f, "test_passed.cpp")); - ^ - -"test_passed.cpp", line 4305: error: static assertion failed - static_assert(is_equal(b.a.f2, "test_passed.cpp")); - ^ - -"test_passed.cpp", line 4306: error: static assertion failed - static_assert(is_equal(b.a.info.file(), "test_passed.cpp")); - ^ - -"test_func_passed.cpp", line 4401: error: static assertion failed with "" - static_assert(b.a.n == 4400, ""); - ^ -"test_func_passed.cpp", line 4401: note: the final comparison was 4201 == 4400 - static_assert(b.a.n == 4400, ""); - ^ - -"test_func_passed.cpp", line 4402: error: static assertion failed with "" - static_assert(b.a.n2 == 4400, ""); - ^ -"test_func_passed.cpp", line 4402: note: the final comparison was 4201 == 4400 - static_assert(b.a.n2 == 4400, ""); - ^ - -"test_func_passed.cpp", line 4403: error: static assertion failed with "" - static_assert(b.a.info.line() == 4400, ""); - ^ -"test_func_passed.cpp", line 4403: note: the final comparison was 4201 == 4400 - static_assert(b.a.info.line() == 4400, ""); - ^ - -"test_func_passed.cpp", line 4404: error: static assertion failed - static_assert(is_equal(b.a.f, "test_func_passed.cpp")); - ^ - -"test_func_passed.cpp", line 4405: error: static assertion failed - static_assert(is_equal(b.a.f2, "test_func_passed.cpp")); - ^ - -"test_func_passed.cpp", line 4406: error: static assertion failed - static_assert(is_equal(b.a.info.file(), "test_func_passed.cpp")); - ^ - -"test_func_passed.cpp", line 4407: error: static assertion failed - static_assert(is_equal(b.a.func, "test_in_func")); - ^ - -"test_func_passed.cpp", line 4408: error: static assertion failed - static_assert(is_equal(b.a.func2, "test_in_func")); - ^ - "test_func_passed.cpp", line 4409: error: static assertion failed static_assert(is_equal(b.a.info.function(), "bool test_out_of_line_init::test_in_func()")); ^ @@ -286,4 +212,4 @@ fe_only -DTEST_NUMBER=9 --clang -tused -e 200 --no_wrap_diagnostics --clang_vers ^ detected during instantiation of "void test_func::inner::C::df(double) [with Ty=test_func::A, T=void]" at line 496 -47 errors detected in the compilation of "Test_name.c". +33 errors detected in the compilation of "Test_name.c". diff --git a/tests/tests/imported/clang/cpp/SemaCXX/.source_location.rto/edg_x86_32_cp.1.1.txt b/tests/tests/imported/clang/cpp/SemaCXX/.source_location.rto/edg_x86_32_cp.1.1.txt index 4cb0c0b090..579dea8c0e 100644 --- a/tests/tests/imported/clang/cpp/SemaCXX/.source_location.rto/edg_x86_32_cp.1.1.txt +++ b/tests/tests/imported/clang/cpp/SemaCXX/.source_location.rto/edg_x86_32_cp.1.1.txt @@ -140,80 +140,6 @@ fe_only -DTEST_NUMBER=1 --clang -tused -e 200 --no_wrap_diagnostics --clang_vers check(t.x, " T", 0); ^ -"test_passed.cpp", line 4301: error: static assertion failed with "" - static_assert(b.a.n == 4300, ""); - ^ -"test_passed.cpp", line 4301: note: the final comparison was 4201 == 4300 - static_assert(b.a.n == 4300, ""); - ^ - -"test_passed.cpp", line 4302: error: static assertion failed with "" - static_assert(b.a.n2 == 4300, ""); - ^ -"test_passed.cpp", line 4302: note: the final comparison was 4201 == 4300 - static_assert(b.a.n2 == 4300, ""); - ^ - -"test_passed.cpp", line 4303: error: static assertion failed with "" - static_assert(b.a.info.line() == 4300, ""); - ^ -"test_passed.cpp", line 4303: note: the final comparison was 4201 == 4300 - static_assert(b.a.info.line() == 4300, ""); - ^ - -"test_passed.cpp", line 4304: error: static assertion failed - static_assert(is_equal(b.a.f, "test_passed.cpp")); - ^ - -"test_passed.cpp", line 4305: error: static assertion failed - static_assert(is_equal(b.a.f2, "test_passed.cpp")); - ^ - -"test_passed.cpp", line 4306: error: static assertion failed - static_assert(is_equal(b.a.info.file(), "test_passed.cpp")); - ^ - -"test_func_passed.cpp", line 4401: error: static assertion failed with "" - static_assert(b.a.n == 4400, ""); - ^ -"test_func_passed.cpp", line 4401: note: the final comparison was 4201 == 4400 - static_assert(b.a.n == 4400, ""); - ^ - -"test_func_passed.cpp", line 4402: error: static assertion failed with "" - static_assert(b.a.n2 == 4400, ""); - ^ -"test_func_passed.cpp", line 4402: note: the final comparison was 4201 == 4400 - static_assert(b.a.n2 == 4400, ""); - ^ - -"test_func_passed.cpp", line 4403: error: static assertion failed with "" - static_assert(b.a.info.line() == 4400, ""); - ^ -"test_func_passed.cpp", line 4403: note: the final comparison was 4201 == 4400 - static_assert(b.a.info.line() == 4400, ""); - ^ - -"test_func_passed.cpp", line 4404: error: static assertion failed - static_assert(is_equal(b.a.f, "test_func_passed.cpp")); - ^ - -"test_func_passed.cpp", line 4405: error: static assertion failed - static_assert(is_equal(b.a.f2, "test_func_passed.cpp")); - ^ - -"test_func_passed.cpp", line 4406: error: static assertion failed - static_assert(is_equal(b.a.info.file(), "test_func_passed.cpp")); - ^ - -"test_func_passed.cpp", line 4407: error: static assertion failed - static_assert(is_equal(b.a.func, "test_in_func")); - ^ - -"test_func_passed.cpp", line 4408: error: static assertion failed - static_assert(is_equal(b.a.func2, "test_in_func")); - ^ - "test_func_passed.cpp", line 4409: error: static assertion failed static_assert(is_equal(b.a.info.function(), "bool test_out_of_line_init::test_in_func()")); ^ @@ -239,4 +165,4 @@ fe_only -DTEST_NUMBER=1 --clang -tused -e 200 --no_wrap_diagnostics --clang_vers T line = __builtin_LINE(); ^ -39 errors detected in the compilation of "Test_name.c". +25 errors detected in the compilation of "Test_name.c". diff --git a/tests/tests/imported/clang/cpp/SemaCXX/.source_location.rto/edg_x86_32_cp.2.1.txt b/tests/tests/imported/clang/cpp/SemaCXX/.source_location.rto/edg_x86_32_cp.2.1.txt index f9cf3dcb3b..5f93cfa0f0 100644 --- a/tests/tests/imported/clang/cpp/SemaCXX/.source_location.rto/edg_x86_32_cp.2.1.txt +++ b/tests/tests/imported/clang/cpp/SemaCXX/.source_location.rto/edg_x86_32_cp.2.1.txt @@ -140,80 +140,6 @@ fe_only -DTEST_NUMBER=2 --clang -tused -e 200 --no_wrap_diagnostics --clang_vers check(t.x, " T", 0); ^ -"test_passed.cpp", line 4301: error: static assertion failed with "" - static_assert(b.a.n == 4300, ""); - ^ -"test_passed.cpp", line 4301: note: the final comparison was 4201 == 4300 - static_assert(b.a.n == 4300, ""); - ^ - -"test_passed.cpp", line 4302: error: static assertion failed with "" - static_assert(b.a.n2 == 4300, ""); - ^ -"test_passed.cpp", line 4302: note: the final comparison was 4201 == 4300 - static_assert(b.a.n2 == 4300, ""); - ^ - -"test_passed.cpp", line 4303: error: static assertion failed with "" - static_assert(b.a.info.line() == 4300, ""); - ^ -"test_passed.cpp", line 4303: note: the final comparison was 4201 == 4300 - static_assert(b.a.info.line() == 4300, ""); - ^ - -"test_passed.cpp", line 4304: error: static assertion failed - static_assert(is_equal(b.a.f, "test_passed.cpp")); - ^ - -"test_passed.cpp", line 4305: error: static assertion failed - static_assert(is_equal(b.a.f2, "test_passed.cpp")); - ^ - -"test_passed.cpp", line 4306: error: static assertion failed - static_assert(is_equal(b.a.info.file(), "test_passed.cpp")); - ^ - -"test_func_passed.cpp", line 4401: error: static assertion failed with "" - static_assert(b.a.n == 4400, ""); - ^ -"test_func_passed.cpp", line 4401: note: the final comparison was 4201 == 4400 - static_assert(b.a.n == 4400, ""); - ^ - -"test_func_passed.cpp", line 4402: error: static assertion failed with "" - static_assert(b.a.n2 == 4400, ""); - ^ -"test_func_passed.cpp", line 4402: note: the final comparison was 4201 == 4400 - static_assert(b.a.n2 == 4400, ""); - ^ - -"test_func_passed.cpp", line 4403: error: static assertion failed with "" - static_assert(b.a.info.line() == 4400, ""); - ^ -"test_func_passed.cpp", line 4403: note: the final comparison was 4201 == 4400 - static_assert(b.a.info.line() == 4400, ""); - ^ - -"test_func_passed.cpp", line 4404: error: static assertion failed - static_assert(is_equal(b.a.f, "test_func_passed.cpp")); - ^ - -"test_func_passed.cpp", line 4405: error: static assertion failed - static_assert(is_equal(b.a.f2, "test_func_passed.cpp")); - ^ - -"test_func_passed.cpp", line 4406: error: static assertion failed - static_assert(is_equal(b.a.info.file(), "test_func_passed.cpp")); - ^ - -"test_func_passed.cpp", line 4407: error: static assertion failed - static_assert(is_equal(b.a.func, "test_in_func")); - ^ - -"test_func_passed.cpp", line 4408: error: static assertion failed - static_assert(is_equal(b.a.func2, "test_in_func")); - ^ - "test_func_passed.cpp", line 4409: error: static assertion failed static_assert(is_equal(b.a.info.function(), "bool test_out_of_line_init::test_in_func()")); ^ @@ -239,4 +165,4 @@ fe_only -DTEST_NUMBER=2 --clang -tused -e 200 --no_wrap_diagnostics --clang_vers T line = __builtin_LINE(); ^ -39 errors detected in the compilation of "Test_name.c". +25 errors detected in the compilation of "Test_name.c". diff --git a/tests/tests/imported/clang/cpp/SemaCXX/.source_location.rto/edg_x86_32_cp.3.1.txt b/tests/tests/imported/clang/cpp/SemaCXX/.source_location.rto/edg_x86_32_cp.3.1.txt index 3b0a7bda86..c94fd4e1ca 100644 --- a/tests/tests/imported/clang/cpp/SemaCXX/.source_location.rto/edg_x86_32_cp.3.1.txt +++ b/tests/tests/imported/clang/cpp/SemaCXX/.source_location.rto/edg_x86_32_cp.3.1.txt @@ -140,80 +140,6 @@ fe_only -DTEST_NUMBER=3 --clang -tused -e 200 --no_wrap_diagnostics --clang_vers check(t.x, " T", 0); ^ -"test_passed.cpp", line 4301: error: static assertion failed with "" - static_assert(b.a.n == 4300, ""); - ^ -"test_passed.cpp", line 4301: note: the final comparison was 4201 == 4300 - static_assert(b.a.n == 4300, ""); - ^ - -"test_passed.cpp", line 4302: error: static assertion failed with "" - static_assert(b.a.n2 == 4300, ""); - ^ -"test_passed.cpp", line 4302: note: the final comparison was 4201 == 4300 - static_assert(b.a.n2 == 4300, ""); - ^ - -"test_passed.cpp", line 4303: error: static assertion failed with "" - static_assert(b.a.info.line() == 4300, ""); - ^ -"test_passed.cpp", line 4303: note: the final comparison was 4201 == 4300 - static_assert(b.a.info.line() == 4300, ""); - ^ - -"test_passed.cpp", line 4304: error: static assertion failed - static_assert(is_equal(b.a.f, "test_passed.cpp")); - ^ - -"test_passed.cpp", line 4305: error: static assertion failed - static_assert(is_equal(b.a.f2, "test_passed.cpp")); - ^ - -"test_passed.cpp", line 4306: error: static assertion failed - static_assert(is_equal(b.a.info.file(), "test_passed.cpp")); - ^ - -"test_func_passed.cpp", line 4401: error: static assertion failed with "" - static_assert(b.a.n == 4400, ""); - ^ -"test_func_passed.cpp", line 4401: note: the final comparison was 4201 == 4400 - static_assert(b.a.n == 4400, ""); - ^ - -"test_func_passed.cpp", line 4402: error: static assertion failed with "" - static_assert(b.a.n2 == 4400, ""); - ^ -"test_func_passed.cpp", line 4402: note: the final comparison was 4201 == 4400 - static_assert(b.a.n2 == 4400, ""); - ^ - -"test_func_passed.cpp", line 4403: error: static assertion failed with "" - static_assert(b.a.info.line() == 4400, ""); - ^ -"test_func_passed.cpp", line 4403: note: the final comparison was 4201 == 4400 - static_assert(b.a.info.line() == 4400, ""); - ^ - -"test_func_passed.cpp", line 4404: error: static assertion failed - static_assert(is_equal(b.a.f, "test_func_passed.cpp")); - ^ - -"test_func_passed.cpp", line 4405: error: static assertion failed - static_assert(is_equal(b.a.f2, "test_func_passed.cpp")); - ^ - -"test_func_passed.cpp", line 4406: error: static assertion failed - static_assert(is_equal(b.a.info.file(), "test_func_passed.cpp")); - ^ - -"test_func_passed.cpp", line 4407: error: static assertion failed - static_assert(is_equal(b.a.func, "test_in_func")); - ^ - -"test_func_passed.cpp", line 4408: error: static assertion failed - static_assert(is_equal(b.a.func2, "test_in_func")); - ^ - "test_func_passed.cpp", line 4409: error: static assertion failed static_assert(is_equal(b.a.info.function(), "bool test_out_of_line_init::test_in_func()")); ^ @@ -239,4 +165,4 @@ fe_only -DTEST_NUMBER=3 --clang -tused -e 200 --no_wrap_diagnostics --clang_vers T line = __builtin_LINE(); ^ -39 errors detected in the compilation of "Test_name.c". +25 errors detected in the compilation of "Test_name.c". diff --git a/tests/tests/imported/clang/cpp/SemaCXX/.source_location.rto/edg_x86_32_cp.6.1.txt b/tests/tests/imported/clang/cpp/SemaCXX/.source_location.rto/edg_x86_32_cp.6.1.txt index a319e0cbe1..c550b6c327 100644 --- a/tests/tests/imported/clang/cpp/SemaCXX/.source_location.rto/edg_x86_32_cp.6.1.txt +++ b/tests/tests/imported/clang/cpp/SemaCXX/.source_location.rto/edg_x86_32_cp.6.1.txt @@ -140,80 +140,6 @@ fe_only -DTEST_NUMBER=6 --clang -tused -e 200 --no_wrap_diagnostics --clang_vers check(t.x, " T", 0); ^ -"test_passed.cpp", line 4301: error: static assertion failed with "" - static_assert(b.a.n == 4300, ""); - ^ -"test_passed.cpp", line 4301: note: the final comparison was 4201 == 4300 - static_assert(b.a.n == 4300, ""); - ^ - -"test_passed.cpp", line 4302: error: static assertion failed with "" - static_assert(b.a.n2 == 4300, ""); - ^ -"test_passed.cpp", line 4302: note: the final comparison was 4201 == 4300 - static_assert(b.a.n2 == 4300, ""); - ^ - -"test_passed.cpp", line 4303: error: static assertion failed with "" - static_assert(b.a.info.line() == 4300, ""); - ^ -"test_passed.cpp", line 4303: note: the final comparison was 4201 == 4300 - static_assert(b.a.info.line() == 4300, ""); - ^ - -"test_passed.cpp", line 4304: error: static assertion failed - static_assert(is_equal(b.a.f, "test_passed.cpp")); - ^ - -"test_passed.cpp", line 4305: error: static assertion failed - static_assert(is_equal(b.a.f2, "test_passed.cpp")); - ^ - -"test_passed.cpp", line 4306: error: static assertion failed - static_assert(is_equal(b.a.info.file(), "test_passed.cpp")); - ^ - -"test_func_passed.cpp", line 4401: error: static assertion failed with "" - static_assert(b.a.n == 4400, ""); - ^ -"test_func_passed.cpp", line 4401: note: the final comparison was 4201 == 4400 - static_assert(b.a.n == 4400, ""); - ^ - -"test_func_passed.cpp", line 4402: error: static assertion failed with "" - static_assert(b.a.n2 == 4400, ""); - ^ -"test_func_passed.cpp", line 4402: note: the final comparison was 4201 == 4400 - static_assert(b.a.n2 == 4400, ""); - ^ - -"test_func_passed.cpp", line 4403: error: static assertion failed with "" - static_assert(b.a.info.line() == 4400, ""); - ^ -"test_func_passed.cpp", line 4403: note: the final comparison was 4201 == 4400 - static_assert(b.a.info.line() == 4400, ""); - ^ - -"test_func_passed.cpp", line 4404: error: static assertion failed - static_assert(is_equal(b.a.f, "test_func_passed.cpp")); - ^ - -"test_func_passed.cpp", line 4405: error: static assertion failed - static_assert(is_equal(b.a.f2, "test_func_passed.cpp")); - ^ - -"test_func_passed.cpp", line 4406: error: static assertion failed - static_assert(is_equal(b.a.info.file(), "test_func_passed.cpp")); - ^ - -"test_func_passed.cpp", line 4407: error: static assertion failed - static_assert(is_equal(b.a.func, "test_in_func")); - ^ - -"test_func_passed.cpp", line 4408: error: static assertion failed - static_assert(is_equal(b.a.func2, "test_in_func")); - ^ - "test_func_passed.cpp", line 4409: error: static assertion failed static_assert(is_equal(b.a.info.function(), "bool test_out_of_line_init::test_in_func()")); ^ @@ -239,4 +165,4 @@ fe_only -DTEST_NUMBER=6 --clang -tused -e 200 --no_wrap_diagnostics --clang_vers T line = __builtin_LINE(); ^ -39 errors detected in the compilation of "Test_name.c". +25 errors detected in the compilation of "Test_name.c". diff --git a/tests/tests/imported/clang/cpp/SemaCXX/.source_location.rto/edg_x86_32_cp.7.1.txt b/tests/tests/imported/clang/cpp/SemaCXX/.source_location.rto/edg_x86_32_cp.7.1.txt index c3e8560053..501656d0a9 100644 --- a/tests/tests/imported/clang/cpp/SemaCXX/.source_location.rto/edg_x86_32_cp.7.1.txt +++ b/tests/tests/imported/clang/cpp/SemaCXX/.source_location.rto/edg_x86_32_cp.7.1.txt @@ -140,80 +140,6 @@ fe_only -DTEST_NUMBER=7 --clang -tused -e 200 --no_wrap_diagnostics --clang_vers check(t.x, " T", 0); ^ -"test_passed.cpp", line 4301: error: static assertion failed with "" - static_assert(b.a.n == 4300, ""); - ^ -"test_passed.cpp", line 4301: note: the final comparison was 4201 == 4300 - static_assert(b.a.n == 4300, ""); - ^ - -"test_passed.cpp", line 4302: error: static assertion failed with "" - static_assert(b.a.n2 == 4300, ""); - ^ -"test_passed.cpp", line 4302: note: the final comparison was 4201 == 4300 - static_assert(b.a.n2 == 4300, ""); - ^ - -"test_passed.cpp", line 4303: error: static assertion failed with "" - static_assert(b.a.info.line() == 4300, ""); - ^ -"test_passed.cpp", line 4303: note: the final comparison was 4201 == 4300 - static_assert(b.a.info.line() == 4300, ""); - ^ - -"test_passed.cpp", line 4304: error: static assertion failed - static_assert(is_equal(b.a.f, "test_passed.cpp")); - ^ - -"test_passed.cpp", line 4305: error: static assertion failed - static_assert(is_equal(b.a.f2, "test_passed.cpp")); - ^ - -"test_passed.cpp", line 4306: error: static assertion failed - static_assert(is_equal(b.a.info.file(), "test_passed.cpp")); - ^ - -"test_func_passed.cpp", line 4401: error: static assertion failed with "" - static_assert(b.a.n == 4400, ""); - ^ -"test_func_passed.cpp", line 4401: note: the final comparison was 4201 == 4400 - static_assert(b.a.n == 4400, ""); - ^ - -"test_func_passed.cpp", line 4402: error: static assertion failed with "" - static_assert(b.a.n2 == 4400, ""); - ^ -"test_func_passed.cpp", line 4402: note: the final comparison was 4201 == 4400 - static_assert(b.a.n2 == 4400, ""); - ^ - -"test_func_passed.cpp", line 4403: error: static assertion failed with "" - static_assert(b.a.info.line() == 4400, ""); - ^ -"test_func_passed.cpp", line 4403: note: the final comparison was 4201 == 4400 - static_assert(b.a.info.line() == 4400, ""); - ^ - -"test_func_passed.cpp", line 4404: error: static assertion failed - static_assert(is_equal(b.a.f, "test_func_passed.cpp")); - ^ - -"test_func_passed.cpp", line 4405: error: static assertion failed - static_assert(is_equal(b.a.f2, "test_func_passed.cpp")); - ^ - -"test_func_passed.cpp", line 4406: error: static assertion failed - static_assert(is_equal(b.a.info.file(), "test_func_passed.cpp")); - ^ - -"test_func_passed.cpp", line 4407: error: static assertion failed - static_assert(is_equal(b.a.func, "test_in_func")); - ^ - -"test_func_passed.cpp", line 4408: error: static assertion failed - static_assert(is_equal(b.a.func2, "test_in_func")); - ^ - "test_func_passed.cpp", line 4409: error: static assertion failed static_assert(is_equal(b.a.info.function(), "bool test_out_of_line_init::test_in_func()")); ^ @@ -239,4 +165,4 @@ fe_only -DTEST_NUMBER=7 --clang -tused -e 200 --no_wrap_diagnostics --clang_vers T line = __builtin_LINE(); ^ -39 errors detected in the compilation of "Test_name.c". +25 errors detected in the compilation of "Test_name.c". diff --git a/tests/tests/imported/clang/cpp/SemaCXX/.source_location.rto/edg_x86_32_cp.8.1.txt b/tests/tests/imported/clang/cpp/SemaCXX/.source_location.rto/edg_x86_32_cp.8.1.txt index 64a14671ce..605159e044 100644 --- a/tests/tests/imported/clang/cpp/SemaCXX/.source_location.rto/edg_x86_32_cp.8.1.txt +++ b/tests/tests/imported/clang/cpp/SemaCXX/.source_location.rto/edg_x86_32_cp.8.1.txt @@ -140,80 +140,6 @@ fe_only -DTEST_NUMBER=8 --clang -tused -e 200 --no_wrap_diagnostics --clang_vers check(t.x, " T", 0); ^ -"test_passed.cpp", line 4301: error: static assertion failed with "" - static_assert(b.a.n == 4300, ""); - ^ -"test_passed.cpp", line 4301: note: the final comparison was 4201 == 4300 - static_assert(b.a.n == 4300, ""); - ^ - -"test_passed.cpp", line 4302: error: static assertion failed with "" - static_assert(b.a.n2 == 4300, ""); - ^ -"test_passed.cpp", line 4302: note: the final comparison was 4201 == 4300 - static_assert(b.a.n2 == 4300, ""); - ^ - -"test_passed.cpp", line 4303: error: static assertion failed with "" - static_assert(b.a.info.line() == 4300, ""); - ^ -"test_passed.cpp", line 4303: note: the final comparison was 4201 == 4300 - static_assert(b.a.info.line() == 4300, ""); - ^ - -"test_passed.cpp", line 4304: error: static assertion failed - static_assert(is_equal(b.a.f, "test_passed.cpp")); - ^ - -"test_passed.cpp", line 4305: error: static assertion failed - static_assert(is_equal(b.a.f2, "test_passed.cpp")); - ^ - -"test_passed.cpp", line 4306: error: static assertion failed - static_assert(is_equal(b.a.info.file(), "test_passed.cpp")); - ^ - -"test_func_passed.cpp", line 4401: error: static assertion failed with "" - static_assert(b.a.n == 4400, ""); - ^ -"test_func_passed.cpp", line 4401: note: the final comparison was 4201 == 4400 - static_assert(b.a.n == 4400, ""); - ^ - -"test_func_passed.cpp", line 4402: error: static assertion failed with "" - static_assert(b.a.n2 == 4400, ""); - ^ -"test_func_passed.cpp", line 4402: note: the final comparison was 4201 == 4400 - static_assert(b.a.n2 == 4400, ""); - ^ - -"test_func_passed.cpp", line 4403: error: static assertion failed with "" - static_assert(b.a.info.line() == 4400, ""); - ^ -"test_func_passed.cpp", line 4403: note: the final comparison was 4201 == 4400 - static_assert(b.a.info.line() == 4400, ""); - ^ - -"test_func_passed.cpp", line 4404: error: static assertion failed - static_assert(is_equal(b.a.f, "test_func_passed.cpp")); - ^ - -"test_func_passed.cpp", line 4405: error: static assertion failed - static_assert(is_equal(b.a.f2, "test_func_passed.cpp")); - ^ - -"test_func_passed.cpp", line 4406: error: static assertion failed - static_assert(is_equal(b.a.info.file(), "test_func_passed.cpp")); - ^ - -"test_func_passed.cpp", line 4407: error: static assertion failed - static_assert(is_equal(b.a.func, "test_in_func")); - ^ - -"test_func_passed.cpp", line 4408: error: static assertion failed - static_assert(is_equal(b.a.func2, "test_in_func")); - ^ - "test_func_passed.cpp", line 4409: error: static assertion failed static_assert(is_equal(b.a.info.function(), "bool test_out_of_line_init::test_in_func()")); ^ @@ -239,4 +165,4 @@ fe_only -DTEST_NUMBER=8 --clang -tused -e 200 --no_wrap_diagnostics --clang_vers T line = __builtin_LINE(); ^ -39 errors detected in the compilation of "Test_name.c". +25 errors detected in the compilation of "Test_name.c". diff --git a/tests/tests/imported/clang/cpp/SemaCXX/.source_location.rto/edg_x86_64_cp.1.1.txt b/tests/tests/imported/clang/cpp/SemaCXX/.source_location.rto/edg_x86_64_cp.1.1.txt index 4cb0c0b090..579dea8c0e 100644 --- a/tests/tests/imported/clang/cpp/SemaCXX/.source_location.rto/edg_x86_64_cp.1.1.txt +++ b/tests/tests/imported/clang/cpp/SemaCXX/.source_location.rto/edg_x86_64_cp.1.1.txt @@ -140,80 +140,6 @@ fe_only -DTEST_NUMBER=1 --clang -tused -e 200 --no_wrap_diagnostics --clang_vers check(t.x, " T", 0); ^ -"test_passed.cpp", line 4301: error: static assertion failed with "" - static_assert(b.a.n == 4300, ""); - ^ -"test_passed.cpp", line 4301: note: the final comparison was 4201 == 4300 - static_assert(b.a.n == 4300, ""); - ^ - -"test_passed.cpp", line 4302: error: static assertion failed with "" - static_assert(b.a.n2 == 4300, ""); - ^ -"test_passed.cpp", line 4302: note: the final comparison was 4201 == 4300 - static_assert(b.a.n2 == 4300, ""); - ^ - -"test_passed.cpp", line 4303: error: static assertion failed with "" - static_assert(b.a.info.line() == 4300, ""); - ^ -"test_passed.cpp", line 4303: note: the final comparison was 4201 == 4300 - static_assert(b.a.info.line() == 4300, ""); - ^ - -"test_passed.cpp", line 4304: error: static assertion failed - static_assert(is_equal(b.a.f, "test_passed.cpp")); - ^ - -"test_passed.cpp", line 4305: error: static assertion failed - static_assert(is_equal(b.a.f2, "test_passed.cpp")); - ^ - -"test_passed.cpp", line 4306: error: static assertion failed - static_assert(is_equal(b.a.info.file(), "test_passed.cpp")); - ^ - -"test_func_passed.cpp", line 4401: error: static assertion failed with "" - static_assert(b.a.n == 4400, ""); - ^ -"test_func_passed.cpp", line 4401: note: the final comparison was 4201 == 4400 - static_assert(b.a.n == 4400, ""); - ^ - -"test_func_passed.cpp", line 4402: error: static assertion failed with "" - static_assert(b.a.n2 == 4400, ""); - ^ -"test_func_passed.cpp", line 4402: note: the final comparison was 4201 == 4400 - static_assert(b.a.n2 == 4400, ""); - ^ - -"test_func_passed.cpp", line 4403: error: static assertion failed with "" - static_assert(b.a.info.line() == 4400, ""); - ^ -"test_func_passed.cpp", line 4403: note: the final comparison was 4201 == 4400 - static_assert(b.a.info.line() == 4400, ""); - ^ - -"test_func_passed.cpp", line 4404: error: static assertion failed - static_assert(is_equal(b.a.f, "test_func_passed.cpp")); - ^ - -"test_func_passed.cpp", line 4405: error: static assertion failed - static_assert(is_equal(b.a.f2, "test_func_passed.cpp")); - ^ - -"test_func_passed.cpp", line 4406: error: static assertion failed - static_assert(is_equal(b.a.info.file(), "test_func_passed.cpp")); - ^ - -"test_func_passed.cpp", line 4407: error: static assertion failed - static_assert(is_equal(b.a.func, "test_in_func")); - ^ - -"test_func_passed.cpp", line 4408: error: static assertion failed - static_assert(is_equal(b.a.func2, "test_in_func")); - ^ - "test_func_passed.cpp", line 4409: error: static assertion failed static_assert(is_equal(b.a.info.function(), "bool test_out_of_line_init::test_in_func()")); ^ @@ -239,4 +165,4 @@ fe_only -DTEST_NUMBER=1 --clang -tused -e 200 --no_wrap_diagnostics --clang_vers T line = __builtin_LINE(); ^ -39 errors detected in the compilation of "Test_name.c". +25 errors detected in the compilation of "Test_name.c". diff --git a/tests/tests/imported/clang/cpp/SemaCXX/.source_location.rto/edg_x86_64_cp.2.1.txt b/tests/tests/imported/clang/cpp/SemaCXX/.source_location.rto/edg_x86_64_cp.2.1.txt index f9cf3dcb3b..5f93cfa0f0 100644 --- a/tests/tests/imported/clang/cpp/SemaCXX/.source_location.rto/edg_x86_64_cp.2.1.txt +++ b/tests/tests/imported/clang/cpp/SemaCXX/.source_location.rto/edg_x86_64_cp.2.1.txt @@ -140,80 +140,6 @@ fe_only -DTEST_NUMBER=2 --clang -tused -e 200 --no_wrap_diagnostics --clang_vers check(t.x, " T", 0); ^ -"test_passed.cpp", line 4301: error: static assertion failed with "" - static_assert(b.a.n == 4300, ""); - ^ -"test_passed.cpp", line 4301: note: the final comparison was 4201 == 4300 - static_assert(b.a.n == 4300, ""); - ^ - -"test_passed.cpp", line 4302: error: static assertion failed with "" - static_assert(b.a.n2 == 4300, ""); - ^ -"test_passed.cpp", line 4302: note: the final comparison was 4201 == 4300 - static_assert(b.a.n2 == 4300, ""); - ^ - -"test_passed.cpp", line 4303: error: static assertion failed with "" - static_assert(b.a.info.line() == 4300, ""); - ^ -"test_passed.cpp", line 4303: note: the final comparison was 4201 == 4300 - static_assert(b.a.info.line() == 4300, ""); - ^ - -"test_passed.cpp", line 4304: error: static assertion failed - static_assert(is_equal(b.a.f, "test_passed.cpp")); - ^ - -"test_passed.cpp", line 4305: error: static assertion failed - static_assert(is_equal(b.a.f2, "test_passed.cpp")); - ^ - -"test_passed.cpp", line 4306: error: static assertion failed - static_assert(is_equal(b.a.info.file(), "test_passed.cpp")); - ^ - -"test_func_passed.cpp", line 4401: error: static assertion failed with "" - static_assert(b.a.n == 4400, ""); - ^ -"test_func_passed.cpp", line 4401: note: the final comparison was 4201 == 4400 - static_assert(b.a.n == 4400, ""); - ^ - -"test_func_passed.cpp", line 4402: error: static assertion failed with "" - static_assert(b.a.n2 == 4400, ""); - ^ -"test_func_passed.cpp", line 4402: note: the final comparison was 4201 == 4400 - static_assert(b.a.n2 == 4400, ""); - ^ - -"test_func_passed.cpp", line 4403: error: static assertion failed with "" - static_assert(b.a.info.line() == 4400, ""); - ^ -"test_func_passed.cpp", line 4403: note: the final comparison was 4201 == 4400 - static_assert(b.a.info.line() == 4400, ""); - ^ - -"test_func_passed.cpp", line 4404: error: static assertion failed - static_assert(is_equal(b.a.f, "test_func_passed.cpp")); - ^ - -"test_func_passed.cpp", line 4405: error: static assertion failed - static_assert(is_equal(b.a.f2, "test_func_passed.cpp")); - ^ - -"test_func_passed.cpp", line 4406: error: static assertion failed - static_assert(is_equal(b.a.info.file(), "test_func_passed.cpp")); - ^ - -"test_func_passed.cpp", line 4407: error: static assertion failed - static_assert(is_equal(b.a.func, "test_in_func")); - ^ - -"test_func_passed.cpp", line 4408: error: static assertion failed - static_assert(is_equal(b.a.func2, "test_in_func")); - ^ - "test_func_passed.cpp", line 4409: error: static assertion failed static_assert(is_equal(b.a.info.function(), "bool test_out_of_line_init::test_in_func()")); ^ @@ -239,4 +165,4 @@ fe_only -DTEST_NUMBER=2 --clang -tused -e 200 --no_wrap_diagnostics --clang_vers T line = __builtin_LINE(); ^ -39 errors detected in the compilation of "Test_name.c". +25 errors detected in the compilation of "Test_name.c". diff --git a/tests/tests/imported/clang/cpp/SemaCXX/.source_location.rto/edg_x86_64_cp.3.1.txt b/tests/tests/imported/clang/cpp/SemaCXX/.source_location.rto/edg_x86_64_cp.3.1.txt index 3b0a7bda86..c94fd4e1ca 100644 --- a/tests/tests/imported/clang/cpp/SemaCXX/.source_location.rto/edg_x86_64_cp.3.1.txt +++ b/tests/tests/imported/clang/cpp/SemaCXX/.source_location.rto/edg_x86_64_cp.3.1.txt @@ -140,80 +140,6 @@ fe_only -DTEST_NUMBER=3 --clang -tused -e 200 --no_wrap_diagnostics --clang_vers check(t.x, " T", 0); ^ -"test_passed.cpp", line 4301: error: static assertion failed with "" - static_assert(b.a.n == 4300, ""); - ^ -"test_passed.cpp", line 4301: note: the final comparison was 4201 == 4300 - static_assert(b.a.n == 4300, ""); - ^ - -"test_passed.cpp", line 4302: error: static assertion failed with "" - static_assert(b.a.n2 == 4300, ""); - ^ -"test_passed.cpp", line 4302: note: the final comparison was 4201 == 4300 - static_assert(b.a.n2 == 4300, ""); - ^ - -"test_passed.cpp", line 4303: error: static assertion failed with "" - static_assert(b.a.info.line() == 4300, ""); - ^ -"test_passed.cpp", line 4303: note: the final comparison was 4201 == 4300 - static_assert(b.a.info.line() == 4300, ""); - ^ - -"test_passed.cpp", line 4304: error: static assertion failed - static_assert(is_equal(b.a.f, "test_passed.cpp")); - ^ - -"test_passed.cpp", line 4305: error: static assertion failed - static_assert(is_equal(b.a.f2, "test_passed.cpp")); - ^ - -"test_passed.cpp", line 4306: error: static assertion failed - static_assert(is_equal(b.a.info.file(), "test_passed.cpp")); - ^ - -"test_func_passed.cpp", line 4401: error: static assertion failed with "" - static_assert(b.a.n == 4400, ""); - ^ -"test_func_passed.cpp", line 4401: note: the final comparison was 4201 == 4400 - static_assert(b.a.n == 4400, ""); - ^ - -"test_func_passed.cpp", line 4402: error: static assertion failed with "" - static_assert(b.a.n2 == 4400, ""); - ^ -"test_func_passed.cpp", line 4402: note: the final comparison was 4201 == 4400 - static_assert(b.a.n2 == 4400, ""); - ^ - -"test_func_passed.cpp", line 4403: error: static assertion failed with "" - static_assert(b.a.info.line() == 4400, ""); - ^ -"test_func_passed.cpp", line 4403: note: the final comparison was 4201 == 4400 - static_assert(b.a.info.line() == 4400, ""); - ^ - -"test_func_passed.cpp", line 4404: error: static assertion failed - static_assert(is_equal(b.a.f, "test_func_passed.cpp")); - ^ - -"test_func_passed.cpp", line 4405: error: static assertion failed - static_assert(is_equal(b.a.f2, "test_func_passed.cpp")); - ^ - -"test_func_passed.cpp", line 4406: error: static assertion failed - static_assert(is_equal(b.a.info.file(), "test_func_passed.cpp")); - ^ - -"test_func_passed.cpp", line 4407: error: static assertion failed - static_assert(is_equal(b.a.func, "test_in_func")); - ^ - -"test_func_passed.cpp", line 4408: error: static assertion failed - static_assert(is_equal(b.a.func2, "test_in_func")); - ^ - "test_func_passed.cpp", line 4409: error: static assertion failed static_assert(is_equal(b.a.info.function(), "bool test_out_of_line_init::test_in_func()")); ^ @@ -239,4 +165,4 @@ fe_only -DTEST_NUMBER=3 --clang -tused -e 200 --no_wrap_diagnostics --clang_vers T line = __builtin_LINE(); ^ -39 errors detected in the compilation of "Test_name.c". +25 errors detected in the compilation of "Test_name.c". diff --git a/tests/tests/imported/clang/cpp/SemaCXX/.source_location.rto/edg_x86_64_cp.6.1.txt b/tests/tests/imported/clang/cpp/SemaCXX/.source_location.rto/edg_x86_64_cp.6.1.txt index a319e0cbe1..c550b6c327 100644 --- a/tests/tests/imported/clang/cpp/SemaCXX/.source_location.rto/edg_x86_64_cp.6.1.txt +++ b/tests/tests/imported/clang/cpp/SemaCXX/.source_location.rto/edg_x86_64_cp.6.1.txt @@ -140,80 +140,6 @@ fe_only -DTEST_NUMBER=6 --clang -tused -e 200 --no_wrap_diagnostics --clang_vers check(t.x, " T", 0); ^ -"test_passed.cpp", line 4301: error: static assertion failed with "" - static_assert(b.a.n == 4300, ""); - ^ -"test_passed.cpp", line 4301: note: the final comparison was 4201 == 4300 - static_assert(b.a.n == 4300, ""); - ^ - -"test_passed.cpp", line 4302: error: static assertion failed with "" - static_assert(b.a.n2 == 4300, ""); - ^ -"test_passed.cpp", line 4302: note: the final comparison was 4201 == 4300 - static_assert(b.a.n2 == 4300, ""); - ^ - -"test_passed.cpp", line 4303: error: static assertion failed with "" - static_assert(b.a.info.line() == 4300, ""); - ^ -"test_passed.cpp", line 4303: note: the final comparison was 4201 == 4300 - static_assert(b.a.info.line() == 4300, ""); - ^ - -"test_passed.cpp", line 4304: error: static assertion failed - static_assert(is_equal(b.a.f, "test_passed.cpp")); - ^ - -"test_passed.cpp", line 4305: error: static assertion failed - static_assert(is_equal(b.a.f2, "test_passed.cpp")); - ^ - -"test_passed.cpp", line 4306: error: static assertion failed - static_assert(is_equal(b.a.info.file(), "test_passed.cpp")); - ^ - -"test_func_passed.cpp", line 4401: error: static assertion failed with "" - static_assert(b.a.n == 4400, ""); - ^ -"test_func_passed.cpp", line 4401: note: the final comparison was 4201 == 4400 - static_assert(b.a.n == 4400, ""); - ^ - -"test_func_passed.cpp", line 4402: error: static assertion failed with "" - static_assert(b.a.n2 == 4400, ""); - ^ -"test_func_passed.cpp", line 4402: note: the final comparison was 4201 == 4400 - static_assert(b.a.n2 == 4400, ""); - ^ - -"test_func_passed.cpp", line 4403: error: static assertion failed with "" - static_assert(b.a.info.line() == 4400, ""); - ^ -"test_func_passed.cpp", line 4403: note: the final comparison was 4201 == 4400 - static_assert(b.a.info.line() == 4400, ""); - ^ - -"test_func_passed.cpp", line 4404: error: static assertion failed - static_assert(is_equal(b.a.f, "test_func_passed.cpp")); - ^ - -"test_func_passed.cpp", line 4405: error: static assertion failed - static_assert(is_equal(b.a.f2, "test_func_passed.cpp")); - ^ - -"test_func_passed.cpp", line 4406: error: static assertion failed - static_assert(is_equal(b.a.info.file(), "test_func_passed.cpp")); - ^ - -"test_func_passed.cpp", line 4407: error: static assertion failed - static_assert(is_equal(b.a.func, "test_in_func")); - ^ - -"test_func_passed.cpp", line 4408: error: static assertion failed - static_assert(is_equal(b.a.func2, "test_in_func")); - ^ - "test_func_passed.cpp", line 4409: error: static assertion failed static_assert(is_equal(b.a.info.function(), "bool test_out_of_line_init::test_in_func()")); ^ @@ -239,4 +165,4 @@ fe_only -DTEST_NUMBER=6 --clang -tused -e 200 --no_wrap_diagnostics --clang_vers T line = __builtin_LINE(); ^ -39 errors detected in the compilation of "Test_name.c". +25 errors detected in the compilation of "Test_name.c". diff --git a/tests/tests/imported/clang/cpp/SemaCXX/.source_location.rto/edg_x86_64_cp.7.1.txt b/tests/tests/imported/clang/cpp/SemaCXX/.source_location.rto/edg_x86_64_cp.7.1.txt index c3e8560053..501656d0a9 100644 --- a/tests/tests/imported/clang/cpp/SemaCXX/.source_location.rto/edg_x86_64_cp.7.1.txt +++ b/tests/tests/imported/clang/cpp/SemaCXX/.source_location.rto/edg_x86_64_cp.7.1.txt @@ -140,80 +140,6 @@ fe_only -DTEST_NUMBER=7 --clang -tused -e 200 --no_wrap_diagnostics --clang_vers check(t.x, " T", 0); ^ -"test_passed.cpp", line 4301: error: static assertion failed with "" - static_assert(b.a.n == 4300, ""); - ^ -"test_passed.cpp", line 4301: note: the final comparison was 4201 == 4300 - static_assert(b.a.n == 4300, ""); - ^ - -"test_passed.cpp", line 4302: error: static assertion failed with "" - static_assert(b.a.n2 == 4300, ""); - ^ -"test_passed.cpp", line 4302: note: the final comparison was 4201 == 4300 - static_assert(b.a.n2 == 4300, ""); - ^ - -"test_passed.cpp", line 4303: error: static assertion failed with "" - static_assert(b.a.info.line() == 4300, ""); - ^ -"test_passed.cpp", line 4303: note: the final comparison was 4201 == 4300 - static_assert(b.a.info.line() == 4300, ""); - ^ - -"test_passed.cpp", line 4304: error: static assertion failed - static_assert(is_equal(b.a.f, "test_passed.cpp")); - ^ - -"test_passed.cpp", line 4305: error: static assertion failed - static_assert(is_equal(b.a.f2, "test_passed.cpp")); - ^ - -"test_passed.cpp", line 4306: error: static assertion failed - static_assert(is_equal(b.a.info.file(), "test_passed.cpp")); - ^ - -"test_func_passed.cpp", line 4401: error: static assertion failed with "" - static_assert(b.a.n == 4400, ""); - ^ -"test_func_passed.cpp", line 4401: note: the final comparison was 4201 == 4400 - static_assert(b.a.n == 4400, ""); - ^ - -"test_func_passed.cpp", line 4402: error: static assertion failed with "" - static_assert(b.a.n2 == 4400, ""); - ^ -"test_func_passed.cpp", line 4402: note: the final comparison was 4201 == 4400 - static_assert(b.a.n2 == 4400, ""); - ^ - -"test_func_passed.cpp", line 4403: error: static assertion failed with "" - static_assert(b.a.info.line() == 4400, ""); - ^ -"test_func_passed.cpp", line 4403: note: the final comparison was 4201 == 4400 - static_assert(b.a.info.line() == 4400, ""); - ^ - -"test_func_passed.cpp", line 4404: error: static assertion failed - static_assert(is_equal(b.a.f, "test_func_passed.cpp")); - ^ - -"test_func_passed.cpp", line 4405: error: static assertion failed - static_assert(is_equal(b.a.f2, "test_func_passed.cpp")); - ^ - -"test_func_passed.cpp", line 4406: error: static assertion failed - static_assert(is_equal(b.a.info.file(), "test_func_passed.cpp")); - ^ - -"test_func_passed.cpp", line 4407: error: static assertion failed - static_assert(is_equal(b.a.func, "test_in_func")); - ^ - -"test_func_passed.cpp", line 4408: error: static assertion failed - static_assert(is_equal(b.a.func2, "test_in_func")); - ^ - "test_func_passed.cpp", line 4409: error: static assertion failed static_assert(is_equal(b.a.info.function(), "bool test_out_of_line_init::test_in_func()")); ^ @@ -239,4 +165,4 @@ fe_only -DTEST_NUMBER=7 --clang -tused -e 200 --no_wrap_diagnostics --clang_vers T line = __builtin_LINE(); ^ -39 errors detected in the compilation of "Test_name.c". +25 errors detected in the compilation of "Test_name.c". diff --git a/tests/tests/imported/clang/cpp/SemaCXX/.source_location.rto/edg_x86_64_cp.8.1.txt b/tests/tests/imported/clang/cpp/SemaCXX/.source_location.rto/edg_x86_64_cp.8.1.txt index 64a14671ce..605159e044 100644 --- a/tests/tests/imported/clang/cpp/SemaCXX/.source_location.rto/edg_x86_64_cp.8.1.txt +++ b/tests/tests/imported/clang/cpp/SemaCXX/.source_location.rto/edg_x86_64_cp.8.1.txt @@ -140,80 +140,6 @@ fe_only -DTEST_NUMBER=8 --clang -tused -e 200 --no_wrap_diagnostics --clang_vers check(t.x, " T", 0); ^ -"test_passed.cpp", line 4301: error: static assertion failed with "" - static_assert(b.a.n == 4300, ""); - ^ -"test_passed.cpp", line 4301: note: the final comparison was 4201 == 4300 - static_assert(b.a.n == 4300, ""); - ^ - -"test_passed.cpp", line 4302: error: static assertion failed with "" - static_assert(b.a.n2 == 4300, ""); - ^ -"test_passed.cpp", line 4302: note: the final comparison was 4201 == 4300 - static_assert(b.a.n2 == 4300, ""); - ^ - -"test_passed.cpp", line 4303: error: static assertion failed with "" - static_assert(b.a.info.line() == 4300, ""); - ^ -"test_passed.cpp", line 4303: note: the final comparison was 4201 == 4300 - static_assert(b.a.info.line() == 4300, ""); - ^ - -"test_passed.cpp", line 4304: error: static assertion failed - static_assert(is_equal(b.a.f, "test_passed.cpp")); - ^ - -"test_passed.cpp", line 4305: error: static assertion failed - static_assert(is_equal(b.a.f2, "test_passed.cpp")); - ^ - -"test_passed.cpp", line 4306: error: static assertion failed - static_assert(is_equal(b.a.info.file(), "test_passed.cpp")); - ^ - -"test_func_passed.cpp", line 4401: error: static assertion failed with "" - static_assert(b.a.n == 4400, ""); - ^ -"test_func_passed.cpp", line 4401: note: the final comparison was 4201 == 4400 - static_assert(b.a.n == 4400, ""); - ^ - -"test_func_passed.cpp", line 4402: error: static assertion failed with "" - static_assert(b.a.n2 == 4400, ""); - ^ -"test_func_passed.cpp", line 4402: note: the final comparison was 4201 == 4400 - static_assert(b.a.n2 == 4400, ""); - ^ - -"test_func_passed.cpp", line 4403: error: static assertion failed with "" - static_assert(b.a.info.line() == 4400, ""); - ^ -"test_func_passed.cpp", line 4403: note: the final comparison was 4201 == 4400 - static_assert(b.a.info.line() == 4400, ""); - ^ - -"test_func_passed.cpp", line 4404: error: static assertion failed - static_assert(is_equal(b.a.f, "test_func_passed.cpp")); - ^ - -"test_func_passed.cpp", line 4405: error: static assertion failed - static_assert(is_equal(b.a.f2, "test_func_passed.cpp")); - ^ - -"test_func_passed.cpp", line 4406: error: static assertion failed - static_assert(is_equal(b.a.info.file(), "test_func_passed.cpp")); - ^ - -"test_func_passed.cpp", line 4407: error: static assertion failed - static_assert(is_equal(b.a.func, "test_in_func")); - ^ - -"test_func_passed.cpp", line 4408: error: static assertion failed - static_assert(is_equal(b.a.func2, "test_in_func")); - ^ - "test_func_passed.cpp", line 4409: error: static assertion failed static_assert(is_equal(b.a.info.function(), "bool test_out_of_line_init::test_in_func()")); ^ @@ -239,4 +165,4 @@ fe_only -DTEST_NUMBER=8 --clang -tused -e 200 --no_wrap_diagnostics --clang_vers T line = __builtin_LINE(); ^ -39 errors detected in the compilation of "Test_name.c". +25 errors detected in the compilation of "Test_name.c". diff --git a/tests/tests/imported/gnu/cpp/init/.array12.rto/default.1.2.txt b/tests/tests/imported/gnu/cpp/init/.array12.rto/default.1.2.txt index 4429c8869c..a1c096628e 100644 --- a/tests/tests/imported/gnu/cpp/init/.array12.rto/default.1.2.txt +++ b/tests/tests/imported/gnu/cpp/init/.array12.rto/default.1.2.txt @@ -1,7 +1,7 @@ ./a.out A() B() -~A() A() B() ~A() +~A() diff --git a/tests/tests/regressions/.edg-29057-eh.rto/default.1.1.txt b/tests/tests/regressions/.edg-29057-eh.rto/default.1.1.txt new file mode 100644 index 0000000000..e99a9f5b61 --- /dev/null +++ b/tests/tests/regressions/.edg-29057-eh.rto/default.1.1.txt @@ -0,0 +1 @@ +eccp -DTEST_NUMBER=1 --c++20 --exceptions --g++ --gnu_version=130300 Test_name.c diff --git a/tests/tests/regressions/.edg-29057-eh.rto/default.1.2.txt b/tests/tests/regressions/.edg-29057-eh.rto/default.1.2.txt new file mode 100644 index 0000000000..ff2642c6d5 --- /dev/null +++ b/tests/tests/regressions/.edg-29057-eh.rto/default.1.2.txt @@ -0,0 +1 @@ +./a.out diff --git a/tests/tests/regressions/.edg-29057-eh.rto/default.2.1.txt b/tests/tests/regressions/.edg-29057-eh.rto/default.2.1.txt new file mode 100644 index 0000000000..da33e91652 --- /dev/null +++ b/tests/tests/regressions/.edg-29057-eh.rto/default.2.1.txt @@ -0,0 +1 @@ +eccp -DTEST_NUMBER=2 --c++20 --exceptions --strict Test_name.c diff --git a/tests/tests/regressions/.edg-29057-eh.rto/default.2.2.txt b/tests/tests/regressions/.edg-29057-eh.rto/default.2.2.txt new file mode 100644 index 0000000000..ff2642c6d5 --- /dev/null +++ b/tests/tests/regressions/.edg-29057-eh.rto/default.2.2.txt @@ -0,0 +1 @@ +./a.out diff --git a/tests/tests/regressions/.edg-29057.rto/default.1.1.txt b/tests/tests/regressions/.edg-29057.rto/default.1.1.txt new file mode 100644 index 0000000000..285a052375 --- /dev/null +++ b/tests/tests/regressions/.edg-29057.rto/default.1.1.txt @@ -0,0 +1 @@ +eccp -DTEST_NUMBER=1 --c++20 --g++ --gnu_version=130300 Test_name.c diff --git a/tests/tests/regressions/.edg-29057.rto/default.1.2.txt b/tests/tests/regressions/.edg-29057.rto/default.1.2.txt new file mode 100644 index 0000000000..ff2642c6d5 --- /dev/null +++ b/tests/tests/regressions/.edg-29057.rto/default.1.2.txt @@ -0,0 +1 @@ +./a.out diff --git a/tests/tests/regressions/.edg-29057.rto/default.2.1.txt b/tests/tests/regressions/.edg-29057.rto/default.2.1.txt new file mode 100644 index 0000000000..8f7e41e84c --- /dev/null +++ b/tests/tests/regressions/.edg-29057.rto/default.2.1.txt @@ -0,0 +1 @@ +eccp -DTEST_NUMBER=2 --c++20 --strict Test_name.c diff --git a/tests/tests/regressions/.edg-29057.rto/default.2.2.txt b/tests/tests/regressions/.edg-29057.rto/default.2.2.txt new file mode 100644 index 0000000000..ff2642c6d5 --- /dev/null +++ b/tests/tests/regressions/.edg-29057.rto/default.2.2.txt @@ -0,0 +1 @@ +./a.out diff --git a/tests/tests/regressions/edg-29057-eh.sft.cpp b/tests/tests/regressions/edg-29057-eh.sft.cpp new file mode 100644 index 0000000000..ff8a5f8f75 --- /dev/null +++ b/tests/tests/regressions/edg-29057-eh.sft.cpp @@ -0,0 +1,52 @@ +//type:rp +//options_all:--c++20 --exceptions +//options:--g++ --gnu_version=130300:--strict +// Aggregate members with nontrivial destructors, where a later member's +// initializer throws: every member constructed before the exception, and +// every temporary, is destroyed exactly once. +int live_temps, made, destroyed, fails; +struct Temp { Temp() { ++live_temps; } ~Temp() { --live_temps; } }; +struct D { + D(const Temp &) { ++made; } + D(const D &) = delete; + ~D() { ++destroyed; } +}; +struct Agg { D a; D b; int c; }; +struct Outer { Agg in; D d; }; +int check(int expected) { fails += live_temps != expected; return 0; } +int thrower() { throw 1; } +void expect(int n) { + fails += made != n || destroyed != n || live_temps != 0; + made = destroyed = 0; +} +int main() { + try { Agg x{D(Temp{}), D(Temp{}), thrower()}; (void)x; } catch (int) {} + expect(2); + try { Agg y{D(Temp{}), D((thrower(), Temp{})), 0}; (void)y; } catch (int) {} + expect(1); + try { + Outer o{{D(Temp{}), D(Temp{}), check(2)}, D((thrower(), Temp{}))}; + (void)o; + } catch (int) {} + expect(2); + { + Agg z{D(Temp{}), D(Temp{}), check(2)}; + check(0); + (void)z; + } + expect(2); + // An exception after the aggregate is complete destroys each member once. + try { + Agg w{D(Temp{}), D(Temp{}), check(2)}; + (void)w; + thrower(); + } catch (int) {} + expect(2); + try { + Outer v{{D(Temp{}), D(Temp{}), check(2)}, D(Temp{})}; + (void)v; + thrower(); + } catch (int) {} + expect(3); + return fails; +} diff --git a/tests/tests/regressions/edg-29057.sft.cpp b/tests/tests/regressions/edg-29057.sft.cpp new file mode 100644 index 0000000000..694801f490 --- /dev/null +++ b/tests/tests/regressions/edg-29057.sft.cpp @@ -0,0 +1,21 @@ +//type:rp +//options_all:--c++20 +//options:--g++ --gnu_version=130300:--strict +int live, fails; +struct Temp { Temp() { ++live; } ~Temp() { --live; } }; +struct A { A(const Temp&) {} }; +struct Pair { A a; int b; }; +int check(int expected) { fails += live != expected; return 0; } +Pair make_pair() { return {A(Temp{}), check(1)}; } +int main() { + Pair p{A(Temp{}), check(1)}; + check(0); + Pair q = make_pair(); + check(0); + Pair a[2]{{A(Temp{}), check(1)}, {A(Temp{}), check(2)}}; + check(0); + struct Nested { Pair p; int c; } n{{A(Temp{}), check(1)}, check(1)}; + check(0); + (void)p; (void)q; (void)a; (void)n; + return fails; +}