PR c++/92531 - ICE with noexcept(lambda).
authorJason Merrill <jason@redhat.com>
Fri, 17 Jan 2020 13:37:49 +0000 (08:37 -0500)
committerJason Merrill <jason@redhat.com>
Fri, 17 Jan 2020 14:25:01 +0000 (09:25 -0500)
commiteff9c61dfb082cb3ea26f354d795e4098ec76866
tree4f3aa4074d5cf5eaee21e6f2877077f5d0f20087
parentc60a18f8056facdcf370ce0e5f51550c9df5b539
PR c++/92531 - ICE with noexcept(lambda).

This was failing because uses_template_parms didn't recognize LAMBDA_EXPR as
a kind of expression.  Instead of trying to enumerate all the different
varieties of expression and then aborting if what's left isn't
error_mark_node, let's handle error_mark_node and then assume anything else
is an expression.

* pt.c (uses_template_parms): Don't try to enumerate all the
expression cases.
gcc/cp/ChangeLog
gcc/cp/pt.c
gcc/testsuite/g++.dg/cpp1z/constexpr-lambda25.C [new file with mode: 0644]