From 1fae051e9af0ddfbda29488d16583c6497590155 Mon Sep 17 00:00:00 2001 From: Christof Meerwald Date: Fri, 6 Nov 2026 13:56:25 +0000 Subject: [PATCH] Spurious error for pack expansions in nested generic lambdas [GH #491] --- src/expr.c | 12 +++-- src/pending_changes/gh-491.txt | 14 ++++++ src/scope_stk.c | 29 ++++++++---- src/scope_stk.h | 30 ++++++------- tests/expectations/edg_x86_64/imported.log | 1 - .../tests/changes/.gh-491.rto/default.1.1.txt | 1 + tests/tests/changes/gh-491.sft.cpp | 10 +++++ .../default.1.1.txt | 27 +---------- .../default.2.1.txt | 27 +---------- .../default.3.1.txt | 27 +---------- .../default.4.1.txt | 27 +---------- .../default.5.1.txt | 27 +---------- .../default.6.1.txt | 27 +---------- .../default.7.1.txt | 27 +---------- .../default.8.1.txt | 27 +---------- .../edg_x86_32_cp.1.1.txt | 27 +---------- .../edg_x86_32_cp.2.1.txt | 27 +---------- .../edg_x86_32_cp.3.1.txt | 27 +---------- .../edg_x86_32_cp.4.1.txt | 27 +---------- .../edg_x86_64_cp.1.1.txt | 27 +---------- .../edg_x86_64_cp.2.1.txt | 27 +---------- .../edg_x86_64_cp.3.1.txt | 27 +---------- .../edg_x86_64_cp.4.1.txt | 27 +---------- .../.generic-lambda.rto/default.1.1.txt | 6 --- .../regressions/.gh-491.rto/default.1.1.txt | 1 + .../regressions/.gh-491.rto/default.2.1.txt | 1 + .../regressions/.gh-491.rto/default.3.1.txt | 1 + .../regressions/.gh-491.rto/default.4.1.txt | 1 + .../regressions/.gh-491.rto/default.5.1.txt | 1 + tests/tests/regressions/gh-491.sft.cpp | 45 +++++++++++++++++++ 30 files changed, 134 insertions(+), 451 deletions(-) create mode 100644 src/pending_changes/gh-491.txt create mode 100644 tests/tests/changes/.gh-491.rto/default.1.1.txt create mode 100644 tests/tests/changes/gh-491.sft.cpp create mode 100644 tests/tests/regressions/.gh-491.rto/default.1.1.txt create mode 100644 tests/tests/regressions/.gh-491.rto/default.2.1.txt create mode 100644 tests/tests/regressions/.gh-491.rto/default.3.1.txt create mode 100644 tests/tests/regressions/.gh-491.rto/default.4.1.txt create mode 100644 tests/tests/regressions/.gh-491.rto/default.5.1.txt create mode 100644 tests/tests/regressions/gh-491.sft.cpp diff --git a/src/expr.c b/src/expr.c index 9ea6f97565..41bcac78d2 100644 --- a/src/expr.c +++ b/src/expr.c @@ -14570,10 +14570,14 @@ indication in *rcblock). pesep != NULL && pesep->instantiation_descr == NULL) { /* Check that the identifier is a parameter pack name. */ if (!symbol_is_pack(sym)) { - expr_pos_error(ec_sizeof_operand_not_parameter_pack, - &pos_curr_token); - suppress_expansion_with_no_packs_diagnostic(pesep); - err = TRUE; + /* An earlier scan may have recorded a pack whose name now + refers to a substituted symbol. */ + if (!pesep->recorded_pack_expansion) { + expr_pos_error(ec_sizeof_operand_not_parameter_pack, + &pos_curr_token); + suppress_expansion_with_no_packs_diagnostic(pesep); + err = TRUE; + } /* if */ } else { record_potential_pack_reference(sym, &pos_curr_token); } /* if */ diff --git a/src/pending_changes/gh-491.txt b/src/pending_changes/gh-491.txt new file mode 100644 index 0000000000..0de30acb89 --- /dev/null +++ b/src/pending_changes/gh-491.txt @@ -0,0 +1,14 @@ +[GH #491] +Spurious error for pack expansions in nested generic lambdas + +Previously, valid pack expansions, sizeof... operands, and fold expressions in +nested generic lambdas (for example, in default arguments or exception +specifications) could be rejected during instantiation with spurious missing +parameter pack errors. For example, with --c++14 -tused: + + int f() { + auto g = [](auto... x) { + return [](auto, int n = sizeof...(x)) { return n; }(0); + }; + return g(1, 2); // Previously a spurious error, now okay. + } diff --git a/src/scope_stk.c b/src/scope_stk.c index 0e103d5532..32d8ea2e41 100644 --- a/src/scope_stk.c +++ b/src/scope_stk.c @@ -11678,6 +11678,7 @@ to it. pesep->enclosing_packs_reset = FALSE; pesep->preserve_deduced_packs = FALSE; pesep->contains_pack_reference = FALSE; + pesep->recorded_pack_expansion = FALSE; return pesep; } /* alloc_pack_expansion_stack_entry */ @@ -13754,6 +13755,12 @@ pack-index scanner. values for both T and U. */ reset_enclosing_pack_values(); pesep->enclosing_packs_reset = TRUE; + if (claim_pack_index || !pedp->is_pack_index) { + /* An earlier scan recorded a pack here, even if lookup now yields + substituted symbols. Pack-index descriptors belong to their + operand scanner, not an enclosing list-level context. */ + pesep->recorded_pack_expansion = TRUE; + } /* if */ } /* if */ /* Allocate an expansion descriptor for this stack entry. */ pesep->expansion_descr = alloc_pack_expansion_descr(); @@ -14202,11 +14209,11 @@ effect and returns NULL. result_pedp = pedp; } /* if */ } else { - /* There were no packs referenced. This is not a pack expansion. - If a pack expansion ("...") has been seen, issue an error that - no packs were encountered. */ + /* No packs were referenced. Diagnose an ellipsis unless an + earlier scan recorded a pack expansion for this context. */ if (pedp->ellipsis_seen && - !pesep->expansion_with_no_packs_diagnostic_issued) { + !pesep->expansion_with_no_packs_diagnostic_issued && + !pesep->recorded_pack_expansion) { pos_error(ec_expansion_contains_no_packs, &pedp->ellipsis_position); } /* if */ @@ -14532,7 +14539,8 @@ a_boolean any_packs_referenced(void) Return TRUE if the current pack expansion context contains any pack references (including those from an enclosing pack context) and we are in a template definition context. See any_packs_referenced_in_curr_context -for more information. +for more information. recorded_pack_expansion is not considered here +because it describes only the context on the top of the stack. */ { a_boolean result = FALSE; @@ -14558,7 +14566,9 @@ references and we are in a template definition context. This differs from any_packs_referenced in that this will only be TRUE if the context on the top of the pack expansion stack contains a pack reference while any_packs_referenced will be TRUE if the reference was in an -enclosing context. +enclosing context. This is also TRUE when an earlier scan recorded a +pack expansion for the context even though the current scan records no +pack references (see recorded_pack_expansion). */ { a_boolean result = FALSE; @@ -14566,12 +14576,15 @@ enclosing context. /* In a prototype instantiation context expansion_descr->packs_referenced will be NULL but contains_pack_reference could be TRUE. In a real instantiation expansion_descr->packs_referenced might be TRUE but - contains_pack_reference will be FALSE. */ + contains_pack_reference will be FALSE. recorded_pack_expansion is + TRUE when an earlier scan recorded a pack expansion but the current + scan records no pack references. */ if (pack_expansion_stack != NULL && !pack_expansion_stack->is_suppression) { a_pack_expansion_stack_entry_ptr pesep = pack_expansion_stack; result = pesep->expansion_descr->packs_referenced != NULL || - pesep->contains_pack_reference; + pesep->contains_pack_reference || + pesep->recorded_pack_expansion; } /* if */ return result; } /* any_packs_referenced_in_curr_context */ diff --git a/src/scope_stk.h b/src/scope_stk.h index d630c1d6a8..db3b56d4ee 100644 --- a/src/scope_stk.h +++ b/src/scope_stk.h @@ -606,55 +606,53 @@ typedef struct a_pack_expansion_stack_entry { /* In rescan contexts, a copy of the supplied template argument list is made. This points to that copy of the list. NULL otherwise. */ - a_byte_boolean - is_rescan; + a_bit_field is_rescan:1; /* TRUE when the expansion is being done in an expression rescan context. In such contexts the current values of the packs are maintained, but no token manipulation or checking is done. */ - a_byte_boolean - is_deduction; + a_bit_field is_deduction:1; /* TRUE when the expansion is being done in an template argument deduction context. In such contexts a new template argument is created for each pack element produced by the deduction process, but no token manipulation or checking is done. */ - a_byte_boolean - is_suppression; + a_bit_field is_suppression:1; /* TRUE when the processing of expansion contexts is being suppressed. This only suppresses expansions from tokens, not rescans. */ - a_byte_boolean - expansion_with_no_packs_diagnostic_issued; + a_bit_field expansion_with_no_packs_diagnostic_issued:1; /* TRUE if suppress_expansion_with_no_packs_diagnostic was called to indicate that the caller already issued a diagnostic for an expansion with no packs. */ - a_byte_boolean - is_lookahead; + a_bit_field is_lookahead:1; /* TRUE if this context is being pushed to distinguish between two contexts. When this is TRUE, it is assumed that another begin... call will be done for the same starting position, and that context will be responsible for the end... and advance... calls. */ - a_byte_boolean - enclosing_packs_reset; + a_bit_field enclosing_packs_reset:1; /* TRUE for a pack expansion of a template declaration in a real instantiation (see call of reset_enclosing_pack_values in begin_potential_pack_expansion_context_full for more information). */ - a_boolean - preserve_deduced_packs; + a_bit_field preserve_deduced_packs:1; /* TRUE if is_rescan is TRUE and deduced parameter packs should be retained in the substituted type. */ - a_byte_boolean - contains_pack_reference; + a_bit_field contains_pack_reference:1; /* TRUE during prototype instantiations if any pack references were recorded while this entry was at the top of the pack expansion stack. */ + a_bit_field recorded_pack_expansion:1; + /* TRUE if an earlier scan recorded a pack expansion + for this context, which is being scanned without + pack instantiation. The descriptor is evidence + of a pack even if lookup yields substituted + symbols and no pack references are recorded. */ } a_pack_expansion_stack_entry; diff --git a/tests/expectations/edg_x86_64/imported.log b/tests/expectations/edg_x86_64/imported.log index 5d37dd9d02..46386c9a23 100644 --- a/tests/expectations/edg_x86_64/imported.log +++ b/tests/expectations/edg_x86_64/imported.log @@ -1506,7 +1506,6 @@ clang/cpp/SemaTemplate/fun-template-def.sft.cpp:fn:-DTEST_NUMBER=1 --c++03:FAIL: clang/cpp/SemaTemplate/fun-template-def.sft.cpp:fn:-DTEST_NUMBER=2 --c++11:FAIL: clang/cpp/SemaTemplate/fun-template-def.sft.cpp:fn:-DTEST_NUMBER=3 --c++17:FAIL: clang/cpp/SemaTemplate/fun-template-def.sft.cpp:fn:-DTEST_NUMBER=4 --c++20:FAIL: -clang/cpp/SemaTemplate/generic-lambda.sft.cpp:fp:-DTEST_NUMBER=1 --c++20:FAIL: clang/cpp/SemaTemplate/instantiate-after-fatal-cxx17.sft.cpp:fp:-DTEST_NUMBER=1 --c++17:CATASTROPHE: clang/cpp/SemaTemplate/instantiate-explicitly-after-fatal.sft.cpp:fp:-DTEST_NUMBER=1 --c++11:FAIL: clang/cpp/SemaTemplate/instantiate-incomplete-typo-suggested-error-limit.sft.cpp:fp:-DTEST_NUMBER=1:FAIL: diff --git a/tests/tests/changes/.gh-491.rto/default.1.1.txt b/tests/tests/changes/.gh-491.rto/default.1.1.txt new file mode 100644 index 0000000000..4a8046f09b --- /dev/null +++ b/tests/tests/changes/.gh-491.rto/default.1.1.txt @@ -0,0 +1 @@ +fe_only -DTEST_NUMBER=1 --c++14 -tused Test_name.c diff --git a/tests/tests/changes/gh-491.sft.cpp b/tests/tests/changes/gh-491.sft.cpp new file mode 100644 index 0000000000..e03cc75246 --- /dev/null +++ b/tests/tests/changes/gh-491.sft.cpp @@ -0,0 +1,10 @@ +//type:fp +//options:--c++14 -tused +//remark:Spurious error for pack expansions in nested generic lambdas + +int f() { + auto g = [](auto... x) { + return [](auto, int n = sizeof...(x)) { return n; }(0); + }; + return g(1, 2); // Previously a spurious error, now okay. +} diff --git a/tests/tests/imported/clang/cpp/SemaCXX/.cxx1y-generic-lambdas.rto/default.1.1.txt b/tests/tests/imported/clang/cpp/SemaCXX/.cxx1y-generic-lambdas.rto/default.1.1.txt index 513fe8509d..57891b4c4c 100644 --- a/tests/tests/imported/clang/cpp/SemaCXX/.cxx1y-generic-lambdas.rto/default.1.1.txt +++ b/tests/tests/imported/clang/cpp/SemaCXX/.cxx1y-generic-lambdas.rto/default.1.1.txt @@ -66,11 +66,6 @@ fe_only -DTEST_NUMBER=1 --clang -tused -e 200 --no_wrap_diagnostics --clang_vers auto L = [](auto a) { ^ -"Test_name.c", line 448: error: pack expansion does not make use of any argument packs - print("d = ", d ..., "\n"); - ^ - detected during instantiation of function "lambda [](auto)->auto [with =char]" at line 461 - "Test_name.c", line 468: error: no suitable conversion function from "lambda [](const char *, int, const char *, double, const char *, int)->char" to "int (*)(const char *, int, const char *, double, const char *, int)" exists int (*np2)(const char*, int, const char*, double, const char*, int) = O; // expected-error{{no viable conversion}} ^ @@ -79,34 +74,14 @@ fe_only -DTEST_NUMBER=1 --clang -tused -e 200 --no_wrap_diagnostics --clang_vers } // end test() ^ -"Test_name.c", line 527: error: the operand of sizeof... must be a parameter pack name - x = sizeof...(b); - ^ - detected during instantiation of "auto nested_non_capturing_lambda_tests::wrapped_within_templates::implicit_return_deduction::fooV(Ts...) [with Ts=]" at line 542 - -"Test_name.c", line 563: error: pack expansion does not make use of any argument packs - print("d = ", d ..., "\n"); - ^ - detected during instantiation of function "lambda [](auto)->auto [with =char]" at line 574 - "Test_name.c", line 581: error: no suitable conversion function from "lambda [](const char *, int, const char *, double, const char *, int)->char" to "int (*)(const char *, int, const char *, double, const char *, int)" exists int (*np2)(const char*, int, const char*, double, const char*, int) = O; // expected-error{{no viable conversion}} ^ -"Test_name.c", line 687: error: pack expansion does not make use of any argument packs - print("d = ", d ..., "\n"); - ^ - detected during instantiation of function "lambda [](auto)->auto [with =char]" at line 700 - "Test_name.c", line 707: error: no suitable conversion function from "lambda [](const char *, int, const char *, double, const char *, int)->char" to "int (*)(const char *, int, const char *, double, const char *, int)" exists int (*np2)(const char*, int, const char*, double, const char*, int) = O; // expected-error{{no viable conversion}} ^ -"Test_name.c", line 728: error: pack expansion does not make use of any argument packs - print("d = ", d ..., "\n"); - ^ - detected during instantiation of function "lambda [](auto)->auto [with =char]" at line 742 - "Test_name.c", line 749: error: no suitable conversion function from "lambda [](const char *, int, const char *, double, const char *, int)->char" to "int (*)(const char *, int, const char *, double, const char *, int)" exists int (*np2)(const char*, int, const char*, double, const char*, int) = O; // expected-error{{no viable conversion}} ^ @@ -156,7 +131,7 @@ fe_only -DTEST_NUMBER=1 --clang -tused -e 200 --no_wrap_diagnostics --clang_vers auto y = [](auto (*p)() -> auto) { return p(); }; ^ -30 errors and 1 catastrophic error detected in the compilation of "Test_name.c". +25 errors and 1 catastrophic error detected in the compilation of "Test_name.c". Compilation aborted. Aborted eccp: front end returned an exit status of 134 diff --git a/tests/tests/imported/clang/cpp/SemaCXX/.cxx1y-generic-lambdas.rto/default.2.1.txt b/tests/tests/imported/clang/cpp/SemaCXX/.cxx1y-generic-lambdas.rto/default.2.1.txt index e281ff0feb..1fb2ab9065 100644 --- a/tests/tests/imported/clang/cpp/SemaCXX/.cxx1y-generic-lambdas.rto/default.2.1.txt +++ b/tests/tests/imported/clang/cpp/SemaCXX/.cxx1y-generic-lambdas.rto/default.2.1.txt @@ -66,11 +66,6 @@ fe_only -DTEST_NUMBER=2 --clang -tused -e 200 --no_wrap_diagnostics --clang_vers auto L = [](auto a) { ^ -"Test_name.c", line 448: error: pack expansion does not make use of any argument packs - print("d = ", d ..., "\n"); - ^ - detected during instantiation of function "lambda [](auto)->auto [with =char]" at line 461 - "Test_name.c", line 468: error: no suitable conversion function from "lambda [](const char *, int, const char *, double, const char *, int)->char" to "int (*)(const char *, int, const char *, double, const char *, int)" exists int (*np2)(const char*, int, const char*, double, const char*, int) = O; // expected-error{{no viable conversion}} ^ @@ -79,34 +74,14 @@ fe_only -DTEST_NUMBER=2 --clang -tused -e 200 --no_wrap_diagnostics --clang_vers } // end test() ^ -"Test_name.c", line 527: error: the operand of sizeof... must be a parameter pack name - x = sizeof...(b); - ^ - detected during instantiation of "auto nested_non_capturing_lambda_tests::wrapped_within_templates::implicit_return_deduction::fooV(Ts...) [with Ts=]" at line 542 - -"Test_name.c", line 563: error: pack expansion does not make use of any argument packs - print("d = ", d ..., "\n"); - ^ - detected during instantiation of function "lambda [](auto)->auto [with =char]" at line 574 - "Test_name.c", line 581: error: no suitable conversion function from "lambda [](const char *, int, const char *, double, const char *, int)->char" to "int (*)(const char *, int, const char *, double, const char *, int)" exists int (*np2)(const char*, int, const char*, double, const char*, int) = O; // expected-error{{no viable conversion}} ^ -"Test_name.c", line 687: error: pack expansion does not make use of any argument packs - print("d = ", d ..., "\n"); - ^ - detected during instantiation of function "lambda [](auto)->auto [with =char]" at line 700 - "Test_name.c", line 707: error: no suitable conversion function from "lambda [](const char *, int, const char *, double, const char *, int)->char" to "int (*)(const char *, int, const char *, double, const char *, int)" exists int (*np2)(const char*, int, const char*, double, const char*, int) = O; // expected-error{{no viable conversion}} ^ -"Test_name.c", line 728: error: pack expansion does not make use of any argument packs - print("d = ", d ..., "\n"); - ^ - detected during instantiation of function "lambda [](auto)->auto [with =char]" at line 742 - "Test_name.c", line 749: error: no suitable conversion function from "lambda [](const char *, int, const char *, double, const char *, int)->char" to "int (*)(const char *, int, const char *, double, const char *, int)" exists int (*np2)(const char*, int, const char*, double, const char*, int) = O; // expected-error{{no viable conversion}} ^ @@ -156,7 +131,7 @@ fe_only -DTEST_NUMBER=2 --clang -tused -e 200 --no_wrap_diagnostics --clang_vers auto y = [](auto (*p)() -> auto) { return p(); }; ^ -30 errors and 1 catastrophic error detected in the compilation of "Test_name.c". +25 errors and 1 catastrophic error detected in the compilation of "Test_name.c". Compilation aborted. Aborted eccp: front end returned an exit status of 134 diff --git a/tests/tests/imported/clang/cpp/SemaCXX/.cxx1y-generic-lambdas.rto/default.3.1.txt b/tests/tests/imported/clang/cpp/SemaCXX/.cxx1y-generic-lambdas.rto/default.3.1.txt index 635606678c..9477bf52c3 100644 --- a/tests/tests/imported/clang/cpp/SemaCXX/.cxx1y-generic-lambdas.rto/default.3.1.txt +++ b/tests/tests/imported/clang/cpp/SemaCXX/.cxx1y-generic-lambdas.rto/default.3.1.txt @@ -66,11 +66,6 @@ fe_only -DTEST_NUMBER=3 --clang -tused -e 200 --no_wrap_diagnostics --clang_vers auto L = [](auto a) { ^ -"Test_name.c", line 448: error: pack expansion does not make use of any argument packs - print("d = ", d ..., "\n"); - ^ - detected during instantiation of function "lambda [](auto)->auto [with =char]" at line 461 - "Test_name.c", line 468: error: no suitable conversion function from "lambda [](const char *, int, const char *, double, const char *, int)->char" to "int (*)(const char *, int, const char *, double, const char *, int)" exists int (*np2)(const char*, int, const char*, double, const char*, int) = O; // expected-error{{no viable conversion}} ^ @@ -140,11 +135,6 @@ fe_only -DTEST_NUMBER=3 --clang -tused -e 200 --no_wrap_diagnostics --clang_vers instantiation of function "lambda [](auto)->auto [with =double]" at line 512 instantiation of "auto nested_non_capturing_lambda_tests::wrapped_within_templates::implicit_return_deduction::fooT(T) [with T=double]" at line 517 -"Test_name.c", line 527: error: the operand of sizeof... must be a parameter pack name - x = sizeof...(b); - ^ - detected during instantiation of "auto nested_non_capturing_lambda_tests::wrapped_within_templates::implicit_return_deduction::fooV(Ts...) [with Ts=]" at line 542 - "Test_name.c", line 525: warning: variable "x" was set but never used int x = 0; ^ @@ -193,29 +183,14 @@ fe_only -DTEST_NUMBER=3 --clang -tused -e 200 --no_wrap_diagnostics --clang_vers instantiation of function "lambda [](auto...)->auto [with =auto, const char *, int, double, char, float, short, unsigned int>]" at line 537 instantiation of "auto nested_non_capturing_lambda_tests::wrapped_within_templates::implicit_return_deduction::fooV(Ts...) [with Ts=]" at line 542 -"Test_name.c", line 563: error: pack expansion does not make use of any argument packs - print("d = ", d ..., "\n"); - ^ - detected during instantiation of function "lambda [](auto)->auto [with =char]" at line 574 - "Test_name.c", line 581: error: no suitable conversion function from "lambda [](const char *, int, const char *, double, const char *, int)->char" to "int (*)(const char *, int, const char *, double, const char *, int)" exists int (*np2)(const char*, int, const char*, double, const char*, int) = O; // expected-error{{no viable conversion}} ^ -"Test_name.c", line 687: error: pack expansion does not make use of any argument packs - print("d = ", d ..., "\n"); - ^ - detected during instantiation of function "lambda [](auto)->auto [with =char]" at line 700 - "Test_name.c", line 707: error: no suitable conversion function from "lambda [](const char *, int, const char *, double, const char *, int)->char" to "int (*)(const char *, int, const char *, double, const char *, int)" exists int (*np2)(const char*, int, const char*, double, const char*, int) = O; // expected-error{{no viable conversion}} ^ -"Test_name.c", line 728: error: pack expansion does not make use of any argument packs - print("d = ", d ..., "\n"); - ^ - detected during instantiation of function "lambda [](auto)->auto [with =char]" at line 742 - "Test_name.c", line 749: error: no suitable conversion function from "lambda [](const char *, int, const char *, double, const char *, int)->char" to "int (*)(const char *, int, const char *, double, const char *, int)" exists int (*np2)(const char*, int, const char*, double, const char*, int) = O; // expected-error{{no viable conversion}} ^ @@ -265,7 +240,7 @@ fe_only -DTEST_NUMBER=3 --clang -tused -e 200 --no_wrap_diagnostics --clang_vers auto y = [](auto (*p)() -> auto) { return p(); }; ^ -30 errors and 1 catastrophic error detected in the compilation of "Test_name.c". +25 errors and 1 catastrophic error detected in the compilation of "Test_name.c". Compilation aborted. Aborted eccp: front end returned an exit status of 134 diff --git a/tests/tests/imported/clang/cpp/SemaCXX/.cxx1y-generic-lambdas.rto/default.4.1.txt b/tests/tests/imported/clang/cpp/SemaCXX/.cxx1y-generic-lambdas.rto/default.4.1.txt index 792868c376..b8adcbc021 100644 --- a/tests/tests/imported/clang/cpp/SemaCXX/.cxx1y-generic-lambdas.rto/default.4.1.txt +++ b/tests/tests/imported/clang/cpp/SemaCXX/.cxx1y-generic-lambdas.rto/default.4.1.txt @@ -66,11 +66,6 @@ fe_only -DTEST_NUMBER=4 --clang -tused -e 200 --no_wrap_diagnostics --clang_vers auto L = [](auto a) { ^ -"Test_name.c", line 448: error: pack expansion does not make use of any argument packs - print("d = ", d ..., "\n"); - ^ - detected during instantiation of function "lambda [](auto)->auto [with =char]" at line 461 - "Test_name.c", line 468: error: no suitable conversion function from "lambda [](const char *, int, const char *, double, const char *, int)->char" to "int (*)(const char *, int, const char *, double, const char *, int)" exists int (*np2)(const char*, int, const char*, double, const char*, int) = O; // expected-error{{no viable conversion}} ^ @@ -140,11 +135,6 @@ fe_only -DTEST_NUMBER=4 --clang -tused -e 200 --no_wrap_diagnostics --clang_vers instantiation of function "lambda [](auto)->auto [with =double]" at line 512 instantiation of "auto nested_non_capturing_lambda_tests::wrapped_within_templates::implicit_return_deduction::fooT(T) [with T=double]" at line 517 -"Test_name.c", line 527: error: the operand of sizeof... must be a parameter pack name - x = sizeof...(b); - ^ - detected during instantiation of "auto nested_non_capturing_lambda_tests::wrapped_within_templates::implicit_return_deduction::fooV(Ts...) [with Ts=]" at line 542 - "Test_name.c", line 525: warning: variable "x" was set but never used int x = 0; ^ @@ -193,29 +183,14 @@ fe_only -DTEST_NUMBER=4 --clang -tused -e 200 --no_wrap_diagnostics --clang_vers instantiation of function "lambda [](auto...)->auto [with =auto, const char *, int, double, char, float, short, unsigned int>]" at line 537 instantiation of "auto nested_non_capturing_lambda_tests::wrapped_within_templates::implicit_return_deduction::fooV(Ts...) [with Ts=]" at line 542 -"Test_name.c", line 563: error: pack expansion does not make use of any argument packs - print("d = ", d ..., "\n"); - ^ - detected during instantiation of function "lambda [](auto)->auto [with =char]" at line 574 - "Test_name.c", line 581: error: no suitable conversion function from "lambda [](const char *, int, const char *, double, const char *, int)->char" to "int (*)(const char *, int, const char *, double, const char *, int)" exists int (*np2)(const char*, int, const char*, double, const char*, int) = O; // expected-error{{no viable conversion}} ^ -"Test_name.c", line 687: error: pack expansion does not make use of any argument packs - print("d = ", d ..., "\n"); - ^ - detected during instantiation of function "lambda [](auto)->auto [with =char]" at line 700 - "Test_name.c", line 707: error: no suitable conversion function from "lambda [](const char *, int, const char *, double, const char *, int)->char" to "int (*)(const char *, int, const char *, double, const char *, int)" exists int (*np2)(const char*, int, const char*, double, const char*, int) = O; // expected-error{{no viable conversion}} ^ -"Test_name.c", line 728: error: pack expansion does not make use of any argument packs - print("d = ", d ..., "\n"); - ^ - detected during instantiation of function "lambda [](auto)->auto [with =char]" at line 742 - "Test_name.c", line 749: error: no suitable conversion function from "lambda [](const char *, int, const char *, double, const char *, int)->char" to "int (*)(const char *, int, const char *, double, const char *, int)" exists int (*np2)(const char*, int, const char*, double, const char*, int) = O; // expected-error{{no viable conversion}} ^ @@ -265,7 +240,7 @@ fe_only -DTEST_NUMBER=4 --clang -tused -e 200 --no_wrap_diagnostics --clang_vers auto y = [](auto (*p)() -> auto) { return p(); }; ^ -30 errors and 1 catastrophic error detected in the compilation of "Test_name.c". +25 errors and 1 catastrophic error detected in the compilation of "Test_name.c". Compilation aborted. Aborted eccp: front end returned an exit status of 134 diff --git a/tests/tests/imported/clang/cpp/SemaCXX/.cxx1y-generic-lambdas.rto/default.5.1.txt b/tests/tests/imported/clang/cpp/SemaCXX/.cxx1y-generic-lambdas.rto/default.5.1.txt index c8b42ea1cf..533bb6d67f 100644 --- a/tests/tests/imported/clang/cpp/SemaCXX/.cxx1y-generic-lambdas.rto/default.5.1.txt +++ b/tests/tests/imported/clang/cpp/SemaCXX/.cxx1y-generic-lambdas.rto/default.5.1.txt @@ -50,43 +50,18 @@ fe_only -DTEST_NUMBER=5 --clang -tused -e 200 --no_wrap_diagnostics --clang_vers i = b; //expected-error 3{{cannot be implicitly captured}} ^ -"Test_name.c", line 448: error: pack expansion does not make use of any argument packs - print("d = ", d ..., "\n"); - ^ - detected during instantiation of function "lambda [](auto)->auto [with =char]" at line 461 - "Test_name.c", line 468: error: no suitable conversion function from "lambda [](const char *, int, const char *, double, const char *, int)->char" to "int (*)(const char *, int, const char *, double, const char *, int)" exists int (*np2)(const char*, int, const char*, double, const char*, int) = O; // expected-error{{no viable conversion}} ^ -"Test_name.c", line 527: error: the operand of sizeof... must be a parameter pack name - x = sizeof...(b); - ^ - detected during instantiation of "auto nested_non_capturing_lambda_tests::wrapped_within_templates::implicit_return_deduction::fooV(Ts...) [with Ts=]" at line 542 - -"Test_name.c", line 563: error: pack expansion does not make use of any argument packs - print("d = ", d ..., "\n"); - ^ - detected during instantiation of function "lambda [](auto)->auto [with =char]" at line 574 - "Test_name.c", line 581: error: no suitable conversion function from "lambda [](const char *, int, const char *, double, const char *, int)->char" to "int (*)(const char *, int, const char *, double, const char *, int)" exists int (*np2)(const char*, int, const char*, double, const char*, int) = O; // expected-error{{no viable conversion}} ^ -"Test_name.c", line 687: error: pack expansion does not make use of any argument packs - print("d = ", d ..., "\n"); - ^ - detected during instantiation of function "lambda [](auto)->auto [with =char]" at line 700 - "Test_name.c", line 707: error: no suitable conversion function from "lambda [](const char *, int, const char *, double, const char *, int)->char" to "int (*)(const char *, int, const char *, double, const char *, int)" exists int (*np2)(const char*, int, const char*, double, const char*, int) = O; // expected-error{{no viable conversion}} ^ -"Test_name.c", line 728: error: pack expansion does not make use of any argument packs - print("d = ", d ..., "\n"); - ^ - detected during instantiation of function "lambda [](auto)->auto [with =char]" at line 742 - "Test_name.c", line 749: error: no suitable conversion function from "lambda [](const char *, int, const char *, double, const char *, int)->char" to "int (*)(const char *, int, const char *, double, const char *, int)" exists int (*np2)(const char*, int, const char*, double, const char*, int) = O; // expected-error{{no viable conversion}} ^ @@ -132,7 +107,7 @@ fe_only -DTEST_NUMBER=5 --clang -tused -e 200 --no_wrap_diagnostics --clang_vers auto y = [](auto (*p)() -> auto) { return p(); }; ^ -30 errors and 1 catastrophic error detected in the compilation of "Test_name.c". +25 errors and 1 catastrophic error detected in the compilation of "Test_name.c". Compilation aborted. Aborted eccp: front end returned an exit status of 134 diff --git a/tests/tests/imported/clang/cpp/SemaCXX/.cxx1y-generic-lambdas.rto/default.6.1.txt b/tests/tests/imported/clang/cpp/SemaCXX/.cxx1y-generic-lambdas.rto/default.6.1.txt index b5008e5c9c..e7c3a77a82 100644 --- a/tests/tests/imported/clang/cpp/SemaCXX/.cxx1y-generic-lambdas.rto/default.6.1.txt +++ b/tests/tests/imported/clang/cpp/SemaCXX/.cxx1y-generic-lambdas.rto/default.6.1.txt @@ -50,43 +50,18 @@ fe_only -DTEST_NUMBER=6 --clang -tused -e 200 --no_wrap_diagnostics --clang_vers i = b; //expected-error 3{{cannot be implicitly captured}} ^ -"Test_name.c", line 448: error: pack expansion does not make use of any argument packs - print("d = ", d ..., "\n"); - ^ - detected during instantiation of function "lambda [](auto)->auto [with =char]" at line 461 - "Test_name.c", line 468: error: no suitable conversion function from "lambda [](const char *, int, const char *, double, const char *, int)->char" to "int (*)(const char *, int, const char *, double, const char *, int)" exists int (*np2)(const char*, int, const char*, double, const char*, int) = O; // expected-error{{no viable conversion}} ^ -"Test_name.c", line 527: error: the operand of sizeof... must be a parameter pack name - x = sizeof...(b); - ^ - detected during instantiation of "auto nested_non_capturing_lambda_tests::wrapped_within_templates::implicit_return_deduction::fooV(Ts...) [with Ts=]" at line 542 - -"Test_name.c", line 563: error: pack expansion does not make use of any argument packs - print("d = ", d ..., "\n"); - ^ - detected during instantiation of function "lambda [](auto)->auto [with =char]" at line 574 - "Test_name.c", line 581: error: no suitable conversion function from "lambda [](const char *, int, const char *, double, const char *, int)->char" to "int (*)(const char *, int, const char *, double, const char *, int)" exists int (*np2)(const char*, int, const char*, double, const char*, int) = O; // expected-error{{no viable conversion}} ^ -"Test_name.c", line 687: error: pack expansion does not make use of any argument packs - print("d = ", d ..., "\n"); - ^ - detected during instantiation of function "lambda [](auto)->auto [with =char]" at line 700 - "Test_name.c", line 707: error: no suitable conversion function from "lambda [](const char *, int, const char *, double, const char *, int)->char" to "int (*)(const char *, int, const char *, double, const char *, int)" exists int (*np2)(const char*, int, const char*, double, const char*, int) = O; // expected-error{{no viable conversion}} ^ -"Test_name.c", line 728: error: pack expansion does not make use of any argument packs - print("d = ", d ..., "\n"); - ^ - detected during instantiation of function "lambda [](auto)->auto [with =char]" at line 742 - "Test_name.c", line 749: error: no suitable conversion function from "lambda [](const char *, int, const char *, double, const char *, int)->char" to "int (*)(const char *, int, const char *, double, const char *, int)" exists int (*np2)(const char*, int, const char*, double, const char*, int) = O; // expected-error{{no viable conversion}} ^ @@ -132,7 +107,7 @@ fe_only -DTEST_NUMBER=6 --clang -tused -e 200 --no_wrap_diagnostics --clang_vers auto y = [](auto (*p)() -> auto) { return p(); }; ^ -30 errors and 1 catastrophic error detected in the compilation of "Test_name.c". +25 errors and 1 catastrophic error detected in the compilation of "Test_name.c". Compilation aborted. Aborted eccp: front end returned an exit status of 134 diff --git a/tests/tests/imported/clang/cpp/SemaCXX/.cxx1y-generic-lambdas.rto/default.7.1.txt b/tests/tests/imported/clang/cpp/SemaCXX/.cxx1y-generic-lambdas.rto/default.7.1.txt index 2c189b2c4f..b806d8f681 100644 --- a/tests/tests/imported/clang/cpp/SemaCXX/.cxx1y-generic-lambdas.rto/default.7.1.txt +++ b/tests/tests/imported/clang/cpp/SemaCXX/.cxx1y-generic-lambdas.rto/default.7.1.txt @@ -50,43 +50,18 @@ fe_only -DTEST_NUMBER=7 --clang -tused -e 200 --no_wrap_diagnostics --clang_vers i = b; //expected-error 3{{cannot be implicitly captured}} ^ -"Test_name.c", line 448: error: pack expansion does not make use of any argument packs - print("d = ", d ..., "\n"); - ^ - detected during instantiation of function "lambda [](auto)->auto [with =char]" at line 461 - "Test_name.c", line 468: error: no suitable conversion function from "lambda [](const char *, int, const char *, double, const char *, int)->char" to "int (*)(const char *, int, const char *, double, const char *, int)" exists int (*np2)(const char*, int, const char*, double, const char*, int) = O; // expected-error{{no viable conversion}} ^ -"Test_name.c", line 527: error: the operand of sizeof... must be a parameter pack name - x = sizeof...(b); - ^ - detected during instantiation of "auto nested_non_capturing_lambda_tests::wrapped_within_templates::implicit_return_deduction::fooV(Ts...) [with Ts=]" at line 542 - -"Test_name.c", line 563: error: pack expansion does not make use of any argument packs - print("d = ", d ..., "\n"); - ^ - detected during instantiation of function "lambda [](auto)->auto [with =char]" at line 574 - "Test_name.c", line 581: error: no suitable conversion function from "lambda [](const char *, int, const char *, double, const char *, int)->char" to "int (*)(const char *, int, const char *, double, const char *, int)" exists int (*np2)(const char*, int, const char*, double, const char*, int) = O; // expected-error{{no viable conversion}} ^ -"Test_name.c", line 687: error: pack expansion does not make use of any argument packs - print("d = ", d ..., "\n"); - ^ - detected during instantiation of function "lambda [](auto)->auto [with =char]" at line 700 - "Test_name.c", line 707: error: no suitable conversion function from "lambda [](const char *, int, const char *, double, const char *, int)->char" to "int (*)(const char *, int, const char *, double, const char *, int)" exists int (*np2)(const char*, int, const char*, double, const char*, int) = O; // expected-error{{no viable conversion}} ^ -"Test_name.c", line 728: error: pack expansion does not make use of any argument packs - print("d = ", d ..., "\n"); - ^ - detected during instantiation of function "lambda [](auto)->auto [with =char]" at line 742 - "Test_name.c", line 749: error: no suitable conversion function from "lambda [](const char *, int, const char *, double, const char *, int)->char" to "int (*)(const char *, int, const char *, double, const char *, int)" exists int (*np2)(const char*, int, const char*, double, const char*, int) = O; // expected-error{{no viable conversion}} ^ @@ -132,7 +107,7 @@ fe_only -DTEST_NUMBER=7 --clang -tused -e 200 --no_wrap_diagnostics --clang_vers auto y = [](auto (*p)() -> auto) { return p(); }; ^ -30 errors and 1 catastrophic error detected in the compilation of "Test_name.c". +25 errors and 1 catastrophic error detected in the compilation of "Test_name.c". Compilation aborted. Aborted eccp: front end returned an exit status of 134 diff --git a/tests/tests/imported/clang/cpp/SemaCXX/.cxx1y-generic-lambdas.rto/default.8.1.txt b/tests/tests/imported/clang/cpp/SemaCXX/.cxx1y-generic-lambdas.rto/default.8.1.txt index 0475b8fb6e..0f124fae5d 100644 --- a/tests/tests/imported/clang/cpp/SemaCXX/.cxx1y-generic-lambdas.rto/default.8.1.txt +++ b/tests/tests/imported/clang/cpp/SemaCXX/.cxx1y-generic-lambdas.rto/default.8.1.txt @@ -50,43 +50,18 @@ fe_only -DTEST_NUMBER=8 --clang -tused -e 200 --no_wrap_diagnostics --clang_vers i = b; //expected-error 3{{cannot be implicitly captured}} ^ -"Test_name.c", line 448: error: pack expansion does not make use of any argument packs - print("d = ", d ..., "\n"); - ^ - detected during instantiation of function "lambda [](auto)->auto [with =char]" at line 461 - "Test_name.c", line 468: error: no suitable conversion function from "lambda [](const char *, int, const char *, double, const char *, int)->char" to "int (*)(const char *, int, const char *, double, const char *, int)" exists int (*np2)(const char*, int, const char*, double, const char*, int) = O; // expected-error{{no viable conversion}} ^ -"Test_name.c", line 527: error: the operand of sizeof... must be a parameter pack name - x = sizeof...(b); - ^ - detected during instantiation of "auto nested_non_capturing_lambda_tests::wrapped_within_templates::implicit_return_deduction::fooV(Ts...) [with Ts=]" at line 542 - -"Test_name.c", line 563: error: pack expansion does not make use of any argument packs - print("d = ", d ..., "\n"); - ^ - detected during instantiation of function "lambda [](auto)->auto [with =char]" at line 574 - "Test_name.c", line 581: error: no suitable conversion function from "lambda [](const char *, int, const char *, double, const char *, int)->char" to "int (*)(const char *, int, const char *, double, const char *, int)" exists int (*np2)(const char*, int, const char*, double, const char*, int) = O; // expected-error{{no viable conversion}} ^ -"Test_name.c", line 687: error: pack expansion does not make use of any argument packs - print("d = ", d ..., "\n"); - ^ - detected during instantiation of function "lambda [](auto)->auto [with =char]" at line 700 - "Test_name.c", line 707: error: no suitable conversion function from "lambda [](const char *, int, const char *, double, const char *, int)->char" to "int (*)(const char *, int, const char *, double, const char *, int)" exists int (*np2)(const char*, int, const char*, double, const char*, int) = O; // expected-error{{no viable conversion}} ^ -"Test_name.c", line 728: error: pack expansion does not make use of any argument packs - print("d = ", d ..., "\n"); - ^ - detected during instantiation of function "lambda [](auto)->auto [with =char]" at line 742 - "Test_name.c", line 749: error: no suitable conversion function from "lambda [](const char *, int, const char *, double, const char *, int)->char" to "int (*)(const char *, int, const char *, double, const char *, int)" exists int (*np2)(const char*, int, const char*, double, const char*, int) = O; // expected-error{{no viable conversion}} ^ @@ -132,7 +107,7 @@ fe_only -DTEST_NUMBER=8 --clang -tused -e 200 --no_wrap_diagnostics --clang_vers auto y = [](auto (*p)() -> auto) { return p(); }; ^ -30 errors and 1 catastrophic error detected in the compilation of "Test_name.c". +25 errors and 1 catastrophic error detected in the compilation of "Test_name.c". Compilation aborted. Aborted eccp: front end returned an exit status of 134 diff --git a/tests/tests/imported/clang/cpp/SemaCXX/.cxx1y-generic-lambdas.rto/edg_x86_32_cp.1.1.txt b/tests/tests/imported/clang/cpp/SemaCXX/.cxx1y-generic-lambdas.rto/edg_x86_32_cp.1.1.txt index 1c49221b41..bfba654965 100644 --- a/tests/tests/imported/clang/cpp/SemaCXX/.cxx1y-generic-lambdas.rto/edg_x86_32_cp.1.1.txt +++ b/tests/tests/imported/clang/cpp/SemaCXX/.cxx1y-generic-lambdas.rto/edg_x86_32_cp.1.1.txt @@ -66,11 +66,6 @@ fe_only -DTEST_NUMBER=1 --clang -tused -e 200 --no_wrap_diagnostics --clang_vers auto L = [](auto a) { ^ -"Test_name.c", line 448: error: pack expansion does not make use of any argument packs - print("d = ", d ..., "\n"); - ^ - detected during instantiation of function "lambda [](auto)->auto [with =char]" at line 461 - "Test_name.c", line 468: error: no suitable conversion function from "lambda [](const char *, int, const char *, double, const char *, int)->char" to "int (*)(const char *, int, const char *, double, const char *, int)" exists int (*np2)(const char*, int, const char*, double, const char*, int) = O; // expected-error{{no viable conversion}} ^ @@ -79,16 +74,6 @@ fe_only -DTEST_NUMBER=1 --clang -tused -e 200 --no_wrap_diagnostics --clang_vers } // end test() ^ -"Test_name.c", line 527: error: the operand of sizeof... must be a parameter pack name - x = sizeof...(b); - ^ - detected during instantiation of "auto nested_non_capturing_lambda_tests::wrapped_within_templates::implicit_return_deduction::fooV(Ts...) [with Ts=]" at line 542 - -"Test_name.c", line 563: error: pack expansion does not make use of any argument packs - print("d = ", d ..., "\n"); - ^ - detected during instantiation of function "lambda [](auto)->auto [with =char]" at line 574 - "Test_name.c", line 581: error: no suitable conversion function from "lambda [](const char *, int, const char *, double, const char *, int)->char" to "int (*)(const char *, int, const char *, double, const char *, int)" exists int (*np2)(const char*, int, const char*, double, const char*, int) = O; // expected-error{{no viable conversion}} ^ @@ -97,20 +82,10 @@ fe_only -DTEST_NUMBER=1 --clang -tused -e 200 --no_wrap_diagnostics --clang_vers decltype(L(L, ts...)) (*fp)(decltype(L), decltype(ts) ...) = L; ^ -"Test_name.c", line 687: error: pack expansion does not make use of any argument packs - print("d = ", d ..., "\n"); - ^ - detected during instantiation of function "lambda [](auto)->auto [with =char]" at line 700 - "Test_name.c", line 707: error: no suitable conversion function from "lambda [](const char *, int, const char *, double, const char *, int)->char" to "int (*)(const char *, int, const char *, double, const char *, int)" exists int (*np2)(const char*, int, const char*, double, const char*, int) = O; // expected-error{{no viable conversion}} ^ -"Test_name.c", line 728: error: pack expansion does not make use of any argument packs - print("d = ", d ..., "\n"); - ^ - detected during instantiation of function "lambda [](auto)->auto [with =char]" at line 742 - "Test_name.c", line 749: error: no suitable conversion function from "lambda [](const char *, int, const char *, double, const char *, int)->char" to "int (*)(const char *, int, const char *, double, const char *, int)" exists int (*np2)(const char*, int, const char*, double, const char*, int) = O; // expected-error{{no viable conversion}} ^ @@ -160,7 +135,7 @@ fe_only -DTEST_NUMBER=1 --clang -tused -e 200 --no_wrap_diagnostics --clang_vers auto y = [](auto (*p)() -> auto) { return p(); }; ^ -30 errors and 1 catastrophic error detected in the compilation of "Test_name.c". +25 errors and 1 catastrophic error detected in the compilation of "Test_name.c". Compilation aborted. Aborted eccp: front end returned an exit status of 134 diff --git a/tests/tests/imported/clang/cpp/SemaCXX/.cxx1y-generic-lambdas.rto/edg_x86_32_cp.2.1.txt b/tests/tests/imported/clang/cpp/SemaCXX/.cxx1y-generic-lambdas.rto/edg_x86_32_cp.2.1.txt index ec01e54139..5068ae30dd 100644 --- a/tests/tests/imported/clang/cpp/SemaCXX/.cxx1y-generic-lambdas.rto/edg_x86_32_cp.2.1.txt +++ b/tests/tests/imported/clang/cpp/SemaCXX/.cxx1y-generic-lambdas.rto/edg_x86_32_cp.2.1.txt @@ -66,11 +66,6 @@ fe_only -DTEST_NUMBER=2 --clang -tused -e 200 --no_wrap_diagnostics --clang_vers auto L = [](auto a) { ^ -"Test_name.c", line 448: error: pack expansion does not make use of any argument packs - print("d = ", d ..., "\n"); - ^ - detected during instantiation of function "lambda [](auto)->auto [with =char]" at line 461 - "Test_name.c", line 468: error: no suitable conversion function from "lambda [](const char *, int, const char *, double, const char *, int)->char" to "int (*)(const char *, int, const char *, double, const char *, int)" exists int (*np2)(const char*, int, const char*, double, const char*, int) = O; // expected-error{{no viable conversion}} ^ @@ -79,16 +74,6 @@ fe_only -DTEST_NUMBER=2 --clang -tused -e 200 --no_wrap_diagnostics --clang_vers } // end test() ^ -"Test_name.c", line 527: error: the operand of sizeof... must be a parameter pack name - x = sizeof...(b); - ^ - detected during instantiation of "auto nested_non_capturing_lambda_tests::wrapped_within_templates::implicit_return_deduction::fooV(Ts...) [with Ts=]" at line 542 - -"Test_name.c", line 563: error: pack expansion does not make use of any argument packs - print("d = ", d ..., "\n"); - ^ - detected during instantiation of function "lambda [](auto)->auto [with =char]" at line 574 - "Test_name.c", line 581: error: no suitable conversion function from "lambda [](const char *, int, const char *, double, const char *, int)->char" to "int (*)(const char *, int, const char *, double, const char *, int)" exists int (*np2)(const char*, int, const char*, double, const char*, int) = O; // expected-error{{no viable conversion}} ^ @@ -97,20 +82,10 @@ fe_only -DTEST_NUMBER=2 --clang -tused -e 200 --no_wrap_diagnostics --clang_vers decltype(L(L, ts...)) (*fp)(decltype(L), decltype(ts) ...) = L; ^ -"Test_name.c", line 687: error: pack expansion does not make use of any argument packs - print("d = ", d ..., "\n"); - ^ - detected during instantiation of function "lambda [](auto)->auto [with =char]" at line 700 - "Test_name.c", line 707: error: no suitable conversion function from "lambda [](const char *, int, const char *, double, const char *, int)->char" to "int (*)(const char *, int, const char *, double, const char *, int)" exists int (*np2)(const char*, int, const char*, double, const char*, int) = O; // expected-error{{no viable conversion}} ^ -"Test_name.c", line 728: error: pack expansion does not make use of any argument packs - print("d = ", d ..., "\n"); - ^ - detected during instantiation of function "lambda [](auto)->auto [with =char]" at line 742 - "Test_name.c", line 749: error: no suitable conversion function from "lambda [](const char *, int, const char *, double, const char *, int)->char" to "int (*)(const char *, int, const char *, double, const char *, int)" exists int (*np2)(const char*, int, const char*, double, const char*, int) = O; // expected-error{{no viable conversion}} ^ @@ -160,7 +135,7 @@ fe_only -DTEST_NUMBER=2 --clang -tused -e 200 --no_wrap_diagnostics --clang_vers auto y = [](auto (*p)() -> auto) { return p(); }; ^ -30 errors and 1 catastrophic error detected in the compilation of "Test_name.c". +25 errors and 1 catastrophic error detected in the compilation of "Test_name.c". Compilation aborted. Aborted eccp: front end returned an exit status of 134 diff --git a/tests/tests/imported/clang/cpp/SemaCXX/.cxx1y-generic-lambdas.rto/edg_x86_32_cp.3.1.txt b/tests/tests/imported/clang/cpp/SemaCXX/.cxx1y-generic-lambdas.rto/edg_x86_32_cp.3.1.txt index 0593534668..eec1675823 100644 --- a/tests/tests/imported/clang/cpp/SemaCXX/.cxx1y-generic-lambdas.rto/edg_x86_32_cp.3.1.txt +++ b/tests/tests/imported/clang/cpp/SemaCXX/.cxx1y-generic-lambdas.rto/edg_x86_32_cp.3.1.txt @@ -66,11 +66,6 @@ fe_only -DTEST_NUMBER=3 --clang -tused -e 200 --no_wrap_diagnostics --clang_vers auto L = [](auto a) { ^ -"Test_name.c", line 448: error: pack expansion does not make use of any argument packs - print("d = ", d ..., "\n"); - ^ - detected during instantiation of function "lambda [](auto)->auto [with =char]" at line 461 - "Test_name.c", line 468: error: no suitable conversion function from "lambda [](const char *, int, const char *, double, const char *, int)->char" to "int (*)(const char *, int, const char *, double, const char *, int)" exists int (*np2)(const char*, int, const char*, double, const char*, int) = O; // expected-error{{no viable conversion}} ^ @@ -140,11 +135,6 @@ fe_only -DTEST_NUMBER=3 --clang -tused -e 200 --no_wrap_diagnostics --clang_vers instantiation of function "lambda [](auto)->auto [with =double]" at line 512 instantiation of "auto nested_non_capturing_lambda_tests::wrapped_within_templates::implicit_return_deduction::fooT(T) [with T=double]" at line 517 -"Test_name.c", line 527: error: the operand of sizeof... must be a parameter pack name - x = sizeof...(b); - ^ - detected during instantiation of "auto nested_non_capturing_lambda_tests::wrapped_within_templates::implicit_return_deduction::fooV(Ts...) [with Ts=]" at line 542 - "Test_name.c", line 525: warning: variable "x" was set but never used int x = 0; ^ @@ -193,11 +183,6 @@ fe_only -DTEST_NUMBER=3 --clang -tused -e 200 --no_wrap_diagnostics --clang_vers instantiation of function "lambda [](auto...)->auto [with =auto, const char *, int, double, char, float, short, unsigned int>]" at line 537 instantiation of "auto nested_non_capturing_lambda_tests::wrapped_within_templates::implicit_return_deduction::fooV(Ts...) [with Ts=]" at line 542 -"Test_name.c", line 563: error: pack expansion does not make use of any argument packs - print("d = ", d ..., "\n"); - ^ - detected during instantiation of function "lambda [](auto)->auto [with =char]" at line 574 - "Test_name.c", line 581: error: no suitable conversion function from "lambda [](const char *, int, const char *, double, const char *, int)->char" to "int (*)(const char *, int, const char *, double, const char *, int)" exists int (*np2)(const char*, int, const char*, double, const char*, int) = O; // expected-error{{no viable conversion}} ^ @@ -206,20 +191,10 @@ fe_only -DTEST_NUMBER=3 --clang -tused -e 200 --no_wrap_diagnostics --clang_vers decltype(L(L, ts...)) (*fp)(decltype(L), decltype(ts) ...) = L; ^ -"Test_name.c", line 687: error: pack expansion does not make use of any argument packs - print("d = ", d ..., "\n"); - ^ - detected during instantiation of function "lambda [](auto)->auto [with =char]" at line 700 - "Test_name.c", line 707: error: no suitable conversion function from "lambda [](const char *, int, const char *, double, const char *, int)->char" to "int (*)(const char *, int, const char *, double, const char *, int)" exists int (*np2)(const char*, int, const char*, double, const char*, int) = O; // expected-error{{no viable conversion}} ^ -"Test_name.c", line 728: error: pack expansion does not make use of any argument packs - print("d = ", d ..., "\n"); - ^ - detected during instantiation of function "lambda [](auto)->auto [with =char]" at line 742 - "Test_name.c", line 749: error: no suitable conversion function from "lambda [](const char *, int, const char *, double, const char *, int)->char" to "int (*)(const char *, int, const char *, double, const char *, int)" exists int (*np2)(const char*, int, const char*, double, const char*, int) = O; // expected-error{{no viable conversion}} ^ @@ -269,7 +244,7 @@ fe_only -DTEST_NUMBER=3 --clang -tused -e 200 --no_wrap_diagnostics --clang_vers auto y = [](auto (*p)() -> auto) { return p(); }; ^ -30 errors and 1 catastrophic error detected in the compilation of "Test_name.c". +25 errors and 1 catastrophic error detected in the compilation of "Test_name.c". Compilation aborted. Aborted eccp: front end returned an exit status of 134 diff --git a/tests/tests/imported/clang/cpp/SemaCXX/.cxx1y-generic-lambdas.rto/edg_x86_32_cp.4.1.txt b/tests/tests/imported/clang/cpp/SemaCXX/.cxx1y-generic-lambdas.rto/edg_x86_32_cp.4.1.txt index a6ecc57138..00d7c66f12 100644 --- a/tests/tests/imported/clang/cpp/SemaCXX/.cxx1y-generic-lambdas.rto/edg_x86_32_cp.4.1.txt +++ b/tests/tests/imported/clang/cpp/SemaCXX/.cxx1y-generic-lambdas.rto/edg_x86_32_cp.4.1.txt @@ -66,11 +66,6 @@ fe_only -DTEST_NUMBER=4 --clang -tused -e 200 --no_wrap_diagnostics --clang_vers auto L = [](auto a) { ^ -"Test_name.c", line 448: error: pack expansion does not make use of any argument packs - print("d = ", d ..., "\n"); - ^ - detected during instantiation of function "lambda [](auto)->auto [with =char]" at line 461 - "Test_name.c", line 468: error: no suitable conversion function from "lambda [](const char *, int, const char *, double, const char *, int)->char" to "int (*)(const char *, int, const char *, double, const char *, int)" exists int (*np2)(const char*, int, const char*, double, const char*, int) = O; // expected-error{{no viable conversion}} ^ @@ -140,11 +135,6 @@ fe_only -DTEST_NUMBER=4 --clang -tused -e 200 --no_wrap_diagnostics --clang_vers instantiation of function "lambda [](auto)->auto [with =double]" at line 512 instantiation of "auto nested_non_capturing_lambda_tests::wrapped_within_templates::implicit_return_deduction::fooT(T) [with T=double]" at line 517 -"Test_name.c", line 527: error: the operand of sizeof... must be a parameter pack name - x = sizeof...(b); - ^ - detected during instantiation of "auto nested_non_capturing_lambda_tests::wrapped_within_templates::implicit_return_deduction::fooV(Ts...) [with Ts=]" at line 542 - "Test_name.c", line 525: warning: variable "x" was set but never used int x = 0; ^ @@ -193,11 +183,6 @@ fe_only -DTEST_NUMBER=4 --clang -tused -e 200 --no_wrap_diagnostics --clang_vers instantiation of function "lambda [](auto...)->auto [with =auto, const char *, int, double, char, float, short, unsigned int>]" at line 537 instantiation of "auto nested_non_capturing_lambda_tests::wrapped_within_templates::implicit_return_deduction::fooV(Ts...) [with Ts=]" at line 542 -"Test_name.c", line 563: error: pack expansion does not make use of any argument packs - print("d = ", d ..., "\n"); - ^ - detected during instantiation of function "lambda [](auto)->auto [with =char]" at line 574 - "Test_name.c", line 581: error: no suitable conversion function from "lambda [](const char *, int, const char *, double, const char *, int)->char" to "int (*)(const char *, int, const char *, double, const char *, int)" exists int (*np2)(const char*, int, const char*, double, const char*, int) = O; // expected-error{{no viable conversion}} ^ @@ -206,20 +191,10 @@ fe_only -DTEST_NUMBER=4 --clang -tused -e 200 --no_wrap_diagnostics --clang_vers decltype(L(L, ts...)) (*fp)(decltype(L), decltype(ts) ...) = L; ^ -"Test_name.c", line 687: error: pack expansion does not make use of any argument packs - print("d = ", d ..., "\n"); - ^ - detected during instantiation of function "lambda [](auto)->auto [with =char]" at line 700 - "Test_name.c", line 707: error: no suitable conversion function from "lambda [](const char *, int, const char *, double, const char *, int)->char" to "int (*)(const char *, int, const char *, double, const char *, int)" exists int (*np2)(const char*, int, const char*, double, const char*, int) = O; // expected-error{{no viable conversion}} ^ -"Test_name.c", line 728: error: pack expansion does not make use of any argument packs - print("d = ", d ..., "\n"); - ^ - detected during instantiation of function "lambda [](auto)->auto [with =char]" at line 742 - "Test_name.c", line 749: error: no suitable conversion function from "lambda [](const char *, int, const char *, double, const char *, int)->char" to "int (*)(const char *, int, const char *, double, const char *, int)" exists int (*np2)(const char*, int, const char*, double, const char*, int) = O; // expected-error{{no viable conversion}} ^ @@ -269,7 +244,7 @@ fe_only -DTEST_NUMBER=4 --clang -tused -e 200 --no_wrap_diagnostics --clang_vers auto y = [](auto (*p)() -> auto) { return p(); }; ^ -30 errors and 1 catastrophic error detected in the compilation of "Test_name.c". +25 errors and 1 catastrophic error detected in the compilation of "Test_name.c". Compilation aborted. Aborted eccp: front end returned an exit status of 134 diff --git a/tests/tests/imported/clang/cpp/SemaCXX/.cxx1y-generic-lambdas.rto/edg_x86_64_cp.1.1.txt b/tests/tests/imported/clang/cpp/SemaCXX/.cxx1y-generic-lambdas.rto/edg_x86_64_cp.1.1.txt index 1c49221b41..bfba654965 100644 --- a/tests/tests/imported/clang/cpp/SemaCXX/.cxx1y-generic-lambdas.rto/edg_x86_64_cp.1.1.txt +++ b/tests/tests/imported/clang/cpp/SemaCXX/.cxx1y-generic-lambdas.rto/edg_x86_64_cp.1.1.txt @@ -66,11 +66,6 @@ fe_only -DTEST_NUMBER=1 --clang -tused -e 200 --no_wrap_diagnostics --clang_vers auto L = [](auto a) { ^ -"Test_name.c", line 448: error: pack expansion does not make use of any argument packs - print("d = ", d ..., "\n"); - ^ - detected during instantiation of function "lambda [](auto)->auto [with =char]" at line 461 - "Test_name.c", line 468: error: no suitable conversion function from "lambda [](const char *, int, const char *, double, const char *, int)->char" to "int (*)(const char *, int, const char *, double, const char *, int)" exists int (*np2)(const char*, int, const char*, double, const char*, int) = O; // expected-error{{no viable conversion}} ^ @@ -79,16 +74,6 @@ fe_only -DTEST_NUMBER=1 --clang -tused -e 200 --no_wrap_diagnostics --clang_vers } // end test() ^ -"Test_name.c", line 527: error: the operand of sizeof... must be a parameter pack name - x = sizeof...(b); - ^ - detected during instantiation of "auto nested_non_capturing_lambda_tests::wrapped_within_templates::implicit_return_deduction::fooV(Ts...) [with Ts=]" at line 542 - -"Test_name.c", line 563: error: pack expansion does not make use of any argument packs - print("d = ", d ..., "\n"); - ^ - detected during instantiation of function "lambda [](auto)->auto [with =char]" at line 574 - "Test_name.c", line 581: error: no suitable conversion function from "lambda [](const char *, int, const char *, double, const char *, int)->char" to "int (*)(const char *, int, const char *, double, const char *, int)" exists int (*np2)(const char*, int, const char*, double, const char*, int) = O; // expected-error{{no viable conversion}} ^ @@ -97,20 +82,10 @@ fe_only -DTEST_NUMBER=1 --clang -tused -e 200 --no_wrap_diagnostics --clang_vers decltype(L(L, ts...)) (*fp)(decltype(L), decltype(ts) ...) = L; ^ -"Test_name.c", line 687: error: pack expansion does not make use of any argument packs - print("d = ", d ..., "\n"); - ^ - detected during instantiation of function "lambda [](auto)->auto [with =char]" at line 700 - "Test_name.c", line 707: error: no suitable conversion function from "lambda [](const char *, int, const char *, double, const char *, int)->char" to "int (*)(const char *, int, const char *, double, const char *, int)" exists int (*np2)(const char*, int, const char*, double, const char*, int) = O; // expected-error{{no viable conversion}} ^ -"Test_name.c", line 728: error: pack expansion does not make use of any argument packs - print("d = ", d ..., "\n"); - ^ - detected during instantiation of function "lambda [](auto)->auto [with =char]" at line 742 - "Test_name.c", line 749: error: no suitable conversion function from "lambda [](const char *, int, const char *, double, const char *, int)->char" to "int (*)(const char *, int, const char *, double, const char *, int)" exists int (*np2)(const char*, int, const char*, double, const char*, int) = O; // expected-error{{no viable conversion}} ^ @@ -160,7 +135,7 @@ fe_only -DTEST_NUMBER=1 --clang -tused -e 200 --no_wrap_diagnostics --clang_vers auto y = [](auto (*p)() -> auto) { return p(); }; ^ -30 errors and 1 catastrophic error detected in the compilation of "Test_name.c". +25 errors and 1 catastrophic error detected in the compilation of "Test_name.c". Compilation aborted. Aborted eccp: front end returned an exit status of 134 diff --git a/tests/tests/imported/clang/cpp/SemaCXX/.cxx1y-generic-lambdas.rto/edg_x86_64_cp.2.1.txt b/tests/tests/imported/clang/cpp/SemaCXX/.cxx1y-generic-lambdas.rto/edg_x86_64_cp.2.1.txt index ec01e54139..5068ae30dd 100644 --- a/tests/tests/imported/clang/cpp/SemaCXX/.cxx1y-generic-lambdas.rto/edg_x86_64_cp.2.1.txt +++ b/tests/tests/imported/clang/cpp/SemaCXX/.cxx1y-generic-lambdas.rto/edg_x86_64_cp.2.1.txt @@ -66,11 +66,6 @@ fe_only -DTEST_NUMBER=2 --clang -tused -e 200 --no_wrap_diagnostics --clang_vers auto L = [](auto a) { ^ -"Test_name.c", line 448: error: pack expansion does not make use of any argument packs - print("d = ", d ..., "\n"); - ^ - detected during instantiation of function "lambda [](auto)->auto [with =char]" at line 461 - "Test_name.c", line 468: error: no suitable conversion function from "lambda [](const char *, int, const char *, double, const char *, int)->char" to "int (*)(const char *, int, const char *, double, const char *, int)" exists int (*np2)(const char*, int, const char*, double, const char*, int) = O; // expected-error{{no viable conversion}} ^ @@ -79,16 +74,6 @@ fe_only -DTEST_NUMBER=2 --clang -tused -e 200 --no_wrap_diagnostics --clang_vers } // end test() ^ -"Test_name.c", line 527: error: the operand of sizeof... must be a parameter pack name - x = sizeof...(b); - ^ - detected during instantiation of "auto nested_non_capturing_lambda_tests::wrapped_within_templates::implicit_return_deduction::fooV(Ts...) [with Ts=]" at line 542 - -"Test_name.c", line 563: error: pack expansion does not make use of any argument packs - print("d = ", d ..., "\n"); - ^ - detected during instantiation of function "lambda [](auto)->auto [with =char]" at line 574 - "Test_name.c", line 581: error: no suitable conversion function from "lambda [](const char *, int, const char *, double, const char *, int)->char" to "int (*)(const char *, int, const char *, double, const char *, int)" exists int (*np2)(const char*, int, const char*, double, const char*, int) = O; // expected-error{{no viable conversion}} ^ @@ -97,20 +82,10 @@ fe_only -DTEST_NUMBER=2 --clang -tused -e 200 --no_wrap_diagnostics --clang_vers decltype(L(L, ts...)) (*fp)(decltype(L), decltype(ts) ...) = L; ^ -"Test_name.c", line 687: error: pack expansion does not make use of any argument packs - print("d = ", d ..., "\n"); - ^ - detected during instantiation of function "lambda [](auto)->auto [with =char]" at line 700 - "Test_name.c", line 707: error: no suitable conversion function from "lambda [](const char *, int, const char *, double, const char *, int)->char" to "int (*)(const char *, int, const char *, double, const char *, int)" exists int (*np2)(const char*, int, const char*, double, const char*, int) = O; // expected-error{{no viable conversion}} ^ -"Test_name.c", line 728: error: pack expansion does not make use of any argument packs - print("d = ", d ..., "\n"); - ^ - detected during instantiation of function "lambda [](auto)->auto [with =char]" at line 742 - "Test_name.c", line 749: error: no suitable conversion function from "lambda [](const char *, int, const char *, double, const char *, int)->char" to "int (*)(const char *, int, const char *, double, const char *, int)" exists int (*np2)(const char*, int, const char*, double, const char*, int) = O; // expected-error{{no viable conversion}} ^ @@ -160,7 +135,7 @@ fe_only -DTEST_NUMBER=2 --clang -tused -e 200 --no_wrap_diagnostics --clang_vers auto y = [](auto (*p)() -> auto) { return p(); }; ^ -30 errors and 1 catastrophic error detected in the compilation of "Test_name.c". +25 errors and 1 catastrophic error detected in the compilation of "Test_name.c". Compilation aborted. Aborted eccp: front end returned an exit status of 134 diff --git a/tests/tests/imported/clang/cpp/SemaCXX/.cxx1y-generic-lambdas.rto/edg_x86_64_cp.3.1.txt b/tests/tests/imported/clang/cpp/SemaCXX/.cxx1y-generic-lambdas.rto/edg_x86_64_cp.3.1.txt index 0593534668..eec1675823 100644 --- a/tests/tests/imported/clang/cpp/SemaCXX/.cxx1y-generic-lambdas.rto/edg_x86_64_cp.3.1.txt +++ b/tests/tests/imported/clang/cpp/SemaCXX/.cxx1y-generic-lambdas.rto/edg_x86_64_cp.3.1.txt @@ -66,11 +66,6 @@ fe_only -DTEST_NUMBER=3 --clang -tused -e 200 --no_wrap_diagnostics --clang_vers auto L = [](auto a) { ^ -"Test_name.c", line 448: error: pack expansion does not make use of any argument packs - print("d = ", d ..., "\n"); - ^ - detected during instantiation of function "lambda [](auto)->auto [with =char]" at line 461 - "Test_name.c", line 468: error: no suitable conversion function from "lambda [](const char *, int, const char *, double, const char *, int)->char" to "int (*)(const char *, int, const char *, double, const char *, int)" exists int (*np2)(const char*, int, const char*, double, const char*, int) = O; // expected-error{{no viable conversion}} ^ @@ -140,11 +135,6 @@ fe_only -DTEST_NUMBER=3 --clang -tused -e 200 --no_wrap_diagnostics --clang_vers instantiation of function "lambda [](auto)->auto [with =double]" at line 512 instantiation of "auto nested_non_capturing_lambda_tests::wrapped_within_templates::implicit_return_deduction::fooT(T) [with T=double]" at line 517 -"Test_name.c", line 527: error: the operand of sizeof... must be a parameter pack name - x = sizeof...(b); - ^ - detected during instantiation of "auto nested_non_capturing_lambda_tests::wrapped_within_templates::implicit_return_deduction::fooV(Ts...) [with Ts=]" at line 542 - "Test_name.c", line 525: warning: variable "x" was set but never used int x = 0; ^ @@ -193,11 +183,6 @@ fe_only -DTEST_NUMBER=3 --clang -tused -e 200 --no_wrap_diagnostics --clang_vers instantiation of function "lambda [](auto...)->auto [with =auto, const char *, int, double, char, float, short, unsigned int>]" at line 537 instantiation of "auto nested_non_capturing_lambda_tests::wrapped_within_templates::implicit_return_deduction::fooV(Ts...) [with Ts=]" at line 542 -"Test_name.c", line 563: error: pack expansion does not make use of any argument packs - print("d = ", d ..., "\n"); - ^ - detected during instantiation of function "lambda [](auto)->auto [with =char]" at line 574 - "Test_name.c", line 581: error: no suitable conversion function from "lambda [](const char *, int, const char *, double, const char *, int)->char" to "int (*)(const char *, int, const char *, double, const char *, int)" exists int (*np2)(const char*, int, const char*, double, const char*, int) = O; // expected-error{{no viable conversion}} ^ @@ -206,20 +191,10 @@ fe_only -DTEST_NUMBER=3 --clang -tused -e 200 --no_wrap_diagnostics --clang_vers decltype(L(L, ts...)) (*fp)(decltype(L), decltype(ts) ...) = L; ^ -"Test_name.c", line 687: error: pack expansion does not make use of any argument packs - print("d = ", d ..., "\n"); - ^ - detected during instantiation of function "lambda [](auto)->auto [with =char]" at line 700 - "Test_name.c", line 707: error: no suitable conversion function from "lambda [](const char *, int, const char *, double, const char *, int)->char" to "int (*)(const char *, int, const char *, double, const char *, int)" exists int (*np2)(const char*, int, const char*, double, const char*, int) = O; // expected-error{{no viable conversion}} ^ -"Test_name.c", line 728: error: pack expansion does not make use of any argument packs - print("d = ", d ..., "\n"); - ^ - detected during instantiation of function "lambda [](auto)->auto [with =char]" at line 742 - "Test_name.c", line 749: error: no suitable conversion function from "lambda [](const char *, int, const char *, double, const char *, int)->char" to "int (*)(const char *, int, const char *, double, const char *, int)" exists int (*np2)(const char*, int, const char*, double, const char*, int) = O; // expected-error{{no viable conversion}} ^ @@ -269,7 +244,7 @@ fe_only -DTEST_NUMBER=3 --clang -tused -e 200 --no_wrap_diagnostics --clang_vers auto y = [](auto (*p)() -> auto) { return p(); }; ^ -30 errors and 1 catastrophic error detected in the compilation of "Test_name.c". +25 errors and 1 catastrophic error detected in the compilation of "Test_name.c". Compilation aborted. Aborted eccp: front end returned an exit status of 134 diff --git a/tests/tests/imported/clang/cpp/SemaCXX/.cxx1y-generic-lambdas.rto/edg_x86_64_cp.4.1.txt b/tests/tests/imported/clang/cpp/SemaCXX/.cxx1y-generic-lambdas.rto/edg_x86_64_cp.4.1.txt index a6ecc57138..00d7c66f12 100644 --- a/tests/tests/imported/clang/cpp/SemaCXX/.cxx1y-generic-lambdas.rto/edg_x86_64_cp.4.1.txt +++ b/tests/tests/imported/clang/cpp/SemaCXX/.cxx1y-generic-lambdas.rto/edg_x86_64_cp.4.1.txt @@ -66,11 +66,6 @@ fe_only -DTEST_NUMBER=4 --clang -tused -e 200 --no_wrap_diagnostics --clang_vers auto L = [](auto a) { ^ -"Test_name.c", line 448: error: pack expansion does not make use of any argument packs - print("d = ", d ..., "\n"); - ^ - detected during instantiation of function "lambda [](auto)->auto [with =char]" at line 461 - "Test_name.c", line 468: error: no suitable conversion function from "lambda [](const char *, int, const char *, double, const char *, int)->char" to "int (*)(const char *, int, const char *, double, const char *, int)" exists int (*np2)(const char*, int, const char*, double, const char*, int) = O; // expected-error{{no viable conversion}} ^ @@ -140,11 +135,6 @@ fe_only -DTEST_NUMBER=4 --clang -tused -e 200 --no_wrap_diagnostics --clang_vers instantiation of function "lambda [](auto)->auto [with =double]" at line 512 instantiation of "auto nested_non_capturing_lambda_tests::wrapped_within_templates::implicit_return_deduction::fooT(T) [with T=double]" at line 517 -"Test_name.c", line 527: error: the operand of sizeof... must be a parameter pack name - x = sizeof...(b); - ^ - detected during instantiation of "auto nested_non_capturing_lambda_tests::wrapped_within_templates::implicit_return_deduction::fooV(Ts...) [with Ts=]" at line 542 - "Test_name.c", line 525: warning: variable "x" was set but never used int x = 0; ^ @@ -193,11 +183,6 @@ fe_only -DTEST_NUMBER=4 --clang -tused -e 200 --no_wrap_diagnostics --clang_vers instantiation of function "lambda [](auto...)->auto [with =auto, const char *, int, double, char, float, short, unsigned int>]" at line 537 instantiation of "auto nested_non_capturing_lambda_tests::wrapped_within_templates::implicit_return_deduction::fooV(Ts...) [with Ts=]" at line 542 -"Test_name.c", line 563: error: pack expansion does not make use of any argument packs - print("d = ", d ..., "\n"); - ^ - detected during instantiation of function "lambda [](auto)->auto [with =char]" at line 574 - "Test_name.c", line 581: error: no suitable conversion function from "lambda [](const char *, int, const char *, double, const char *, int)->char" to "int (*)(const char *, int, const char *, double, const char *, int)" exists int (*np2)(const char*, int, const char*, double, const char*, int) = O; // expected-error{{no viable conversion}} ^ @@ -206,20 +191,10 @@ fe_only -DTEST_NUMBER=4 --clang -tused -e 200 --no_wrap_diagnostics --clang_vers decltype(L(L, ts...)) (*fp)(decltype(L), decltype(ts) ...) = L; ^ -"Test_name.c", line 687: error: pack expansion does not make use of any argument packs - print("d = ", d ..., "\n"); - ^ - detected during instantiation of function "lambda [](auto)->auto [with =char]" at line 700 - "Test_name.c", line 707: error: no suitable conversion function from "lambda [](const char *, int, const char *, double, const char *, int)->char" to "int (*)(const char *, int, const char *, double, const char *, int)" exists int (*np2)(const char*, int, const char*, double, const char*, int) = O; // expected-error{{no viable conversion}} ^ -"Test_name.c", line 728: error: pack expansion does not make use of any argument packs - print("d = ", d ..., "\n"); - ^ - detected during instantiation of function "lambda [](auto)->auto [with =char]" at line 742 - "Test_name.c", line 749: error: no suitable conversion function from "lambda [](const char *, int, const char *, double, const char *, int)->char" to "int (*)(const char *, int, const char *, double, const char *, int)" exists int (*np2)(const char*, int, const char*, double, const char*, int) = O; // expected-error{{no viable conversion}} ^ @@ -269,7 +244,7 @@ fe_only -DTEST_NUMBER=4 --clang -tused -e 200 --no_wrap_diagnostics --clang_vers auto y = [](auto (*p)() -> auto) { return p(); }; ^ -30 errors and 1 catastrophic error detected in the compilation of "Test_name.c". +25 errors and 1 catastrophic error detected in the compilation of "Test_name.c". Compilation aborted. Aborted eccp: front end returned an exit status of 134 diff --git a/tests/tests/imported/clang/cpp/SemaTemplate/.generic-lambda.rto/default.1.1.txt b/tests/tests/imported/clang/cpp/SemaTemplate/.generic-lambda.rto/default.1.1.txt index 226ded11d8..84fcb2f3a1 100644 --- a/tests/tests/imported/clang/cpp/SemaTemplate/.generic-lambda.rto/default.1.1.txt +++ b/tests/tests/imported/clang/cpp/SemaTemplate/.generic-lambda.rto/default.1.1.txt @@ -1,7 +1 @@ fe_only -DTEST_NUMBER=1 --clang -tused -e 200 --no_wrap_diagnostics --clang_version 999999 --c++20 Test_name.c -"Test_name.c", line 81: error: pack expansion does not make use of any argument packs - [...f = fn](auto tpl) noexcept(noexcept(g(fn...))) { return 0; }(0); - ^ - detected during instantiation of "int GH95735::foo(auto...) [with =]" at line 85 - -1 error detected in the compilation of "Test_name.c". diff --git a/tests/tests/regressions/.gh-491.rto/default.1.1.txt b/tests/tests/regressions/.gh-491.rto/default.1.1.txt new file mode 100644 index 0000000000..000401d5e8 --- /dev/null +++ b/tests/tests/regressions/.gh-491.rto/default.1.1.txt @@ -0,0 +1 @@ +fe_only -DTEST_NUMBER=1 -tused --c++14 Test_name.c diff --git a/tests/tests/regressions/.gh-491.rto/default.2.1.txt b/tests/tests/regressions/.gh-491.rto/default.2.1.txt new file mode 100644 index 0000000000..bd52c656ac --- /dev/null +++ b/tests/tests/regressions/.gh-491.rto/default.2.1.txt @@ -0,0 +1 @@ +fe_only -DTEST_NUMBER=2 -tused --c++17 Test_name.c diff --git a/tests/tests/regressions/.gh-491.rto/default.3.1.txt b/tests/tests/regressions/.gh-491.rto/default.3.1.txt new file mode 100644 index 0000000000..026b79da45 --- /dev/null +++ b/tests/tests/regressions/.gh-491.rto/default.3.1.txt @@ -0,0 +1 @@ +fe_only -DTEST_NUMBER=3 -tused --c++14 --gn 150200 Test_name.c diff --git a/tests/tests/regressions/.gh-491.rto/default.4.1.txt b/tests/tests/regressions/.gh-491.rto/default.4.1.txt new file mode 100644 index 0000000000..b948b095a1 --- /dev/null +++ b/tests/tests/regressions/.gh-491.rto/default.4.1.txt @@ -0,0 +1 @@ +fe_only -DTEST_NUMBER=4 -tused --c++14 --clang_version 220100 Test_name.c diff --git a/tests/tests/regressions/.gh-491.rto/default.5.1.txt b/tests/tests/regressions/.gh-491.rto/default.5.1.txt new file mode 100644 index 0000000000..e99ad74536 --- /dev/null +++ b/tests/tests/regressions/.gh-491.rto/default.5.1.txt @@ -0,0 +1 @@ +fe_only -DTEST_NUMBER=5 -tused --ms_c++20 --microsoft_version 1950 Test_name.c diff --git a/tests/tests/regressions/gh-491.sft.cpp b/tests/tests/regressions/gh-491.sft.cpp new file mode 100644 index 0000000000..48b931a19e --- /dev/null +++ b/tests/tests/regressions/gh-491.sft.cpp @@ -0,0 +1,45 @@ +//type:fp +//options:--c++14:--c++17:--c++14 --gn 150200:--c++14 --clang_version 220100:--ms_c++20 --microsoft_version 1950 +//options_all:-tused +//remark:Recorded packs in generic lambdas + +namespace call_expansion { + int g(int) noexcept; + int g(int, int) noexcept; + + template + auto f(Ts... x) noexcept { + return [](auto) noexcept(noexcept(g(x...))) { return 0; }; + } + static_assert(noexcept(f(42)(0)), ""); + static_assert(noexcept(f(1, 2)(0)), ""); +} + +namespace sizeof_pack { + template + auto f(Ts... x) noexcept { + return [](auto) noexcept(sizeof...(x) != 0) { return 0; }; + } + static_assert(noexcept(f(42)(0)), ""); + static_assert(noexcept(f(1, 2)(0)), ""); +} + +namespace default_argument { + int f() { + auto g = [](auto... x) { + return [](auto, int n = sizeof...(x)) { return n; }(0); + }; + return g(1, 2); + } +} + +#if __cpp_fold_expressions >= 201603L +namespace fold_expression { + template + auto f(Ts... x) noexcept { + return [](auto) noexcept((noexcept(x) && ...)) { return 0; }; + } + static_assert(noexcept(f(42)(0)), ""); + static_assert(noexcept(f(1, 2)(0)), ""); +} +#endif