The r12-8258 fix assumes that DECL_CONTEXT of 'pack' in
check_for_bare_parameter_packs is going to be an operator()
but as this test shows, it can be empty.
PR c++/119134
gcc/cp/ChangeLog:
* pt.cc (check_for_bare_parameter_packs): Check DECL_CONTEXT.
gcc/testsuite/ChangeLog:
* g++.dg/cpp2a/lambda-uneval24.C: New test.
Reviewed-by: Jason Merrill <jason@redhat.com>
tree pack = TREE_VALUE (parameter_packs);
if (is_capture_proxy (pack)
|| (TREE_CODE (pack) == PARM_DECL
+ && DECL_CONTEXT (pack)
&& DECL_CONTEXT (DECL_CONTEXT (pack)) == lam))
break;
}
--- /dev/null
+// PR c++/119134
+// { dg-do compile { target c++20 } }
+
+void f(auto... args) requires(([args] {}, ..., true)) {}