From c7931b721229db2d001177829f423a66a50e7d9a 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 [GH #515] A temporary created in the initializer of an element of an aggregate was destroyed at the end of that element's initialization in some contexts, 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. GCC versions before 12 and MSVC destroy such temporaries at the end of each element in the initializer of a variable (but not in mem-initializers, default member initializers, or new-expressions), so keep the previous behavior for variables when emulating them. Add regression tests for variables, mem-initializers, default member initializers, new-expressions, lifetime extension through a reference member, exceptions, a suspended initializer, and the emulation of GCC 11 and MSVC. gnu/cpp/cpp0x/initlist122, gnu/cpp/init/aggr7-eh and gnu/cpp/init/array12 now pass. --- src/decl_inits.c | 34 ++++++++- src/expr.c | 3 + src/lower_init.c | 2 + .../gh-515-aggregate-temporary-lifetime.txt | 18 +++++ 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 +- .../.gh-515-eh.rto/default.1.1.txt | 1 + .../.gh-515-eh.rto/default.1.2.txt | 1 + .../.gh-515-eh.rto/default.2.1.txt | 1 + .../.gh-515-eh.rto/default.2.2.txt | 1 + .../.gh-515-emulation.rto/default.1.1.txt | 1 + .../.gh-515-emulation.rto/default.1.2.txt | 1 + .../.gh-515-emulation.rto/default.2.1.txt | 1 + .../.gh-515-emulation.rto/default.2.2.txt | 1 + .../.gh-515-suspended.rto/default.1.1.txt | 1 + .../.gh-515-suspended.rto/default.1.2.txt | 1 + .../.gh-515-suspended.rto/default.2.1.txt | 1 + .../.gh-515-suspended.rto/default.2.2.txt | 1 + .../regressions/.gh-515.rto/default.1.1.txt | 1 + .../regressions/.gh-515.rto/default.1.2.txt | 1 + .../regressions/.gh-515.rto/default.2.1.txt | 1 + .../regressions/.gh-515.rto/default.2.2.txt | 1 + tests/tests/regressions/gh-515-eh.sft.cpp | 53 +++++++++++++ .../regressions/gh-515-emulation.sft.cpp | 37 +++++++++ .../regressions/gh-515-suspended.sft.cpp | 22 ++++++ tests/tests/regressions/gh-515.sft.cpp | 60 +++++++++++++++ 49 files changed, 267 insertions(+), 1657 deletions(-) create mode 100644 src/pending_changes/gh-515-aggregate-temporary-lifetime.txt create mode 100644 tests/tests/regressions/.gh-515-eh.rto/default.1.1.txt create mode 100644 tests/tests/regressions/.gh-515-eh.rto/default.1.2.txt create mode 100644 tests/tests/regressions/.gh-515-eh.rto/default.2.1.txt create mode 100644 tests/tests/regressions/.gh-515-eh.rto/default.2.2.txt create mode 100644 tests/tests/regressions/.gh-515-emulation.rto/default.1.1.txt create mode 100644 tests/tests/regressions/.gh-515-emulation.rto/default.1.2.txt create mode 100644 tests/tests/regressions/.gh-515-emulation.rto/default.2.1.txt create mode 100644 tests/tests/regressions/.gh-515-emulation.rto/default.2.2.txt create mode 100644 tests/tests/regressions/.gh-515-suspended.rto/default.1.1.txt create mode 100644 tests/tests/regressions/.gh-515-suspended.rto/default.1.2.txt create mode 100644 tests/tests/regressions/.gh-515-suspended.rto/default.2.1.txt create mode 100644 tests/tests/regressions/.gh-515-suspended.rto/default.2.2.txt create mode 100644 tests/tests/regressions/.gh-515.rto/default.1.1.txt create mode 100644 tests/tests/regressions/.gh-515.rto/default.1.2.txt create mode 100644 tests/tests/regressions/.gh-515.rto/default.2.1.txt create mode 100644 tests/tests/regressions/.gh-515.rto/default.2.2.txt create mode 100644 tests/tests/regressions/gh-515-eh.sft.cpp create mode 100644 tests/tests/regressions/gh-515-emulation.sft.cpp create mode 100644 tests/tests/regressions/gh-515-suspended.sft.cpp create mode 100644 tests/tests/regressions/gh-515.sft.cpp diff --git a/src/decl_inits.c b/src/decl_inits.c index c077697a93..b983bb45b0 100644 --- a/src/decl_inits.c +++ b/src/decl_inits.c @@ -4704,12 +4704,27 @@ 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); + is_var_init = dps != NULL && dps->sym != NULL && + variable_for_symbol(dps->sym) != NULL; + /* In C++, the elements of a braced aggregate initializer are not separate + full-expressions: Temporaries created for them are destroyed when the + initialization of the whole aggregate is complete. GCC versions before + 12 and MSVC instead destroy them at the end of each element in the + initializer of a variable (but not in other contexts, such as + mem-initializers and new-expressions). */ + full_expression = !C_mode() && is->elements_are_full_expressions && + is_aggregate_type(dtype) && + !(dps != NULL && dps->is_struct_binding_decl) && + !(is_var_init && + (gpp_version_is(<120000) || microsoft_mode)); if (rescan_aggr != NULL) { /* Rescan. The {...} is provided by the caller in init-component form. */ icp_tree = rescan_aggr; @@ -4728,8 +4743,12 @@ initializer, already copied and substituted. } /* if */ icp = icp_tree; check_assertion(icp != NULL && is_braced_init_component(icp)); - is_var_init = dps != NULL && dps->sym != NULL && - variable_for_symbol(dps->sym) != NULL; + 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 */ /* The force_dynamic_init flag only applies to the top-level result. */ is->force_dynamic_init = FALSE; if (is_template_dependent_context() && is_variadic_template_context() && @@ -4933,6 +4952,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 8986d35f0c..f27ea5839a 100644 --- a/src/expr.c +++ b/src/expr.c @@ -48020,11 +48020,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. */ @@ -48059,6 +48061,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/gh-515-aggregate-temporary-lifetime.txt b/src/pending_changes/gh-515-aggregate-temporary-lifetime.txt new file mode 100644 index 0000000000..aa33f0d992 --- /dev/null +++ b/src/pending_changes/gh-515-aggregate-temporary-lifetime.txt @@ -0,0 +1,18 @@ +[GH #515] +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 in some contexts +(e.g., in the initializer of a variable, a mem-initializer, or a default +member initializer), instead of when the initialization of the whole +aggregate is complete. It is now destroyed at the end of the complete +initialization, including for nested aggregate initializers. When emulating +GCC versions before 12 or MSVC, which destroy such temporaries at the end of +each element in the initializer of a variable, that behavior is kept for +variables. 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 12ba47df3f..3133ed4ca4 100644 --- a/tests/expectations/edg_x86_64/imported.log +++ b/tests/expectations/edg_x86_64/imported.log @@ -6644,7 +6644,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: @@ -7721,10 +7720,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/.gh-515-eh.rto/default.1.1.txt b/tests/tests/regressions/.gh-515-eh.rto/default.1.1.txt new file mode 100644 index 0000000000..e99a9f5b61 --- /dev/null +++ b/tests/tests/regressions/.gh-515-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/.gh-515-eh.rto/default.1.2.txt b/tests/tests/regressions/.gh-515-eh.rto/default.1.2.txt new file mode 100644 index 0000000000..ff2642c6d5 --- /dev/null +++ b/tests/tests/regressions/.gh-515-eh.rto/default.1.2.txt @@ -0,0 +1 @@ +./a.out diff --git a/tests/tests/regressions/.gh-515-eh.rto/default.2.1.txt b/tests/tests/regressions/.gh-515-eh.rto/default.2.1.txt new file mode 100644 index 0000000000..da33e91652 --- /dev/null +++ b/tests/tests/regressions/.gh-515-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/.gh-515-eh.rto/default.2.2.txt b/tests/tests/regressions/.gh-515-eh.rto/default.2.2.txt new file mode 100644 index 0000000000..ff2642c6d5 --- /dev/null +++ b/tests/tests/regressions/.gh-515-eh.rto/default.2.2.txt @@ -0,0 +1 @@ +./a.out diff --git a/tests/tests/regressions/.gh-515-emulation.rto/default.1.1.txt b/tests/tests/regressions/.gh-515-emulation.rto/default.1.1.txt new file mode 100644 index 0000000000..58538a57cd --- /dev/null +++ b/tests/tests/regressions/.gh-515-emulation.rto/default.1.1.txt @@ -0,0 +1 @@ +eccp -DTEST_NUMBER=1 --c++20 --g++ --gnu_version=110400 Test_name.c diff --git a/tests/tests/regressions/.gh-515-emulation.rto/default.1.2.txt b/tests/tests/regressions/.gh-515-emulation.rto/default.1.2.txt new file mode 100644 index 0000000000..ff2642c6d5 --- /dev/null +++ b/tests/tests/regressions/.gh-515-emulation.rto/default.1.2.txt @@ -0,0 +1 @@ +./a.out diff --git a/tests/tests/regressions/.gh-515-emulation.rto/default.2.1.txt b/tests/tests/regressions/.gh-515-emulation.rto/default.2.1.txt new file mode 100644 index 0000000000..069fd0021f --- /dev/null +++ b/tests/tests/regressions/.gh-515-emulation.rto/default.2.1.txt @@ -0,0 +1 @@ +eccp -DTEST_NUMBER=2 --c++20 --ms_c++20 --microsoft_version=1944 Test_name.c diff --git a/tests/tests/regressions/.gh-515-emulation.rto/default.2.2.txt b/tests/tests/regressions/.gh-515-emulation.rto/default.2.2.txt new file mode 100644 index 0000000000..ff2642c6d5 --- /dev/null +++ b/tests/tests/regressions/.gh-515-emulation.rto/default.2.2.txt @@ -0,0 +1 @@ +./a.out diff --git a/tests/tests/regressions/.gh-515-suspended.rto/default.1.1.txt b/tests/tests/regressions/.gh-515-suspended.rto/default.1.1.txt new file mode 100644 index 0000000000..285a052375 --- /dev/null +++ b/tests/tests/regressions/.gh-515-suspended.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/.gh-515-suspended.rto/default.1.2.txt b/tests/tests/regressions/.gh-515-suspended.rto/default.1.2.txt new file mode 100644 index 0000000000..ff2642c6d5 --- /dev/null +++ b/tests/tests/regressions/.gh-515-suspended.rto/default.1.2.txt @@ -0,0 +1 @@ +./a.out diff --git a/tests/tests/regressions/.gh-515-suspended.rto/default.2.1.txt b/tests/tests/regressions/.gh-515-suspended.rto/default.2.1.txt new file mode 100644 index 0000000000..8f7e41e84c --- /dev/null +++ b/tests/tests/regressions/.gh-515-suspended.rto/default.2.1.txt @@ -0,0 +1 @@ +eccp -DTEST_NUMBER=2 --c++20 --strict Test_name.c diff --git a/tests/tests/regressions/.gh-515-suspended.rto/default.2.2.txt b/tests/tests/regressions/.gh-515-suspended.rto/default.2.2.txt new file mode 100644 index 0000000000..ff2642c6d5 --- /dev/null +++ b/tests/tests/regressions/.gh-515-suspended.rto/default.2.2.txt @@ -0,0 +1 @@ +./a.out diff --git a/tests/tests/regressions/.gh-515.rto/default.1.1.txt b/tests/tests/regressions/.gh-515.rto/default.1.1.txt new file mode 100644 index 0000000000..285a052375 --- /dev/null +++ b/tests/tests/regressions/.gh-515.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/.gh-515.rto/default.1.2.txt b/tests/tests/regressions/.gh-515.rto/default.1.2.txt new file mode 100644 index 0000000000..ff2642c6d5 --- /dev/null +++ b/tests/tests/regressions/.gh-515.rto/default.1.2.txt @@ -0,0 +1 @@ +./a.out diff --git a/tests/tests/regressions/.gh-515.rto/default.2.1.txt b/tests/tests/regressions/.gh-515.rto/default.2.1.txt new file mode 100644 index 0000000000..8f7e41e84c --- /dev/null +++ b/tests/tests/regressions/.gh-515.rto/default.2.1.txt @@ -0,0 +1 @@ +eccp -DTEST_NUMBER=2 --c++20 --strict Test_name.c diff --git a/tests/tests/regressions/.gh-515.rto/default.2.2.txt b/tests/tests/regressions/.gh-515.rto/default.2.2.txt new file mode 100644 index 0000000000..ff2642c6d5 --- /dev/null +++ b/tests/tests/regressions/.gh-515.rto/default.2.2.txt @@ -0,0 +1 @@ +./a.out diff --git a/tests/tests/regressions/gh-515-eh.sft.cpp b/tests/tests/regressions/gh-515-eh.sft.cpp new file mode 100644 index 0000000000..11ea6e9990 --- /dev/null +++ b/tests/tests/regressions/gh-515-eh.sft.cpp @@ -0,0 +1,53 @@ +//type:rp +//options_all:--c++20 --exceptions +//remark:Temporaries in aggregate initializers when an exception is thrown +//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/gh-515-emulation.sft.cpp b/tests/tests/regressions/gh-515-emulation.sft.cpp new file mode 100644 index 0000000000..27429629e3 --- /dev/null +++ b/tests/tests/regressions/gh-515-emulation.sft.cpp @@ -0,0 +1,37 @@ +//type:rp +//options_all:--c++20 +//options:--g++ --gnu_version=110400:--ms_c++20 --microsoft_version=1944 +//remark:Temporaries in aggregate initializers when emulating GCC 11 and MSVC + +// GCC before 12 and MSVC destroy a temporary at the end of each element in +// the initializer of a variable, but keep it until the end of the complete +// initialization in other contexts. + +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)}; } +Pair ns{A(Temp{}), check(0)}; +struct Holder { + Pair p; + Holder() : p{A(Temp{}), check(1)} {} +}; +struct Nsdmi { + Pair p{A(Temp{}), check(1)}; +}; + +int main() { + Pair p{A(Temp{}), check(0)}; + static Pair s{A(Temp{}), check(0)}; + Pair q = make_pair(); + Holder h; + Nsdmi d; + Pair *np = new Pair{A(Temp{}), check(1)}; + delete np; + check(0); + (void)p; (void)s; (void)q; (void)h; (void)d; + return fails; +} diff --git a/tests/tests/regressions/gh-515-suspended.sft.cpp b/tests/tests/regressions/gh-515-suspended.sft.cpp new file mode 100644 index 0000000000..bf5c80950c --- /dev/null +++ b/tests/tests/regressions/gh-515-suspended.sft.cpp @@ -0,0 +1,22 @@ +//type:rp +//options_all:--c++20 +//options:--g++ --gnu_version=130300:--strict +//remark:Temporaries in a suspended and resumed aggregate initializer + +int live, fails, idx; +struct Temp { Temp() { ++live; } ~Temp() { --live; } }; +struct A { A(const Temp&) {} }; +struct Pair { A a; int b; }; +int check() { fails += live != ++idx; return 0; } +#define E1 {A(Temp{}), check()} +#define E10 E1, E1, E1, E1, E1, E1, E1, E1, E1, E1 +#define E100 E10, E10, E10, E10, E10, E10, E10, E10, E10, E10 +int main() { + // More than 1,000 elements, so the parsing of the initializer is suspended + // and resumed. + Pair a[] = {E100, E100, E100, E100, E100, E100, E100, E100, E100, E100, + E100}; + fails += live != 0 || idx != 1100; + (void)a; + return fails; +} diff --git a/tests/tests/regressions/gh-515.sft.cpp b/tests/tests/regressions/gh-515.sft.cpp new file mode 100644 index 0000000000..dae21364ee --- /dev/null +++ b/tests/tests/regressions/gh-515.sft.cpp @@ -0,0 +1,60 @@ +//type:rp +//options_all:--c++20 +//options:--g++ --gnu_version=130300:--strict +//remark:Temporaries in aggregate initializers live until the end of the init. + +// A temporary created for an element of a braced aggregate initializer is +// destroyed when the initialization of the whole aggregate is complete, not +// at the end of the element. + +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)}; } + +// Namespace-scope variable (dynamically initialized before main). +Pair ns{A(Temp{}), check(1)}; + +// Mem-initializer and default member initializer. +struct Holder { + Pair p; + Holder() : p{A(Temp{}), check(1)} {} +}; +struct Nsdmi { + Pair p{A(Temp{}), check(1)}; +}; + +// A temporary bound to a reference member is lifetime-extended. +struct Ref { const Temp &r; int b; }; + +int main() { + check(0); + Pair p{A(Temp{}), check(1)}; + check(0); + static Pair s{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); + Holder h; + check(0); + Nsdmi d; + check(0); + Pair *np = new Pair{A(Temp{}), check(1)}; + check(0); + delete np; + { + Ref r{Temp{}, check(1)}; + check(1); + (void)r; + } + check(0); + (void)p; (void)s; (void)q; (void)a; (void)n; (void)h; (void)d; + return fails; +}