c++: remove LAMBDA_EXPR_MUTABLE_P
commit8315f9986592803bbce32f37d8f197a8c945e4c5
authorJason Merrill <jason@redhat.com>
Wed, 29 Nov 2023 23:08:23 +0000 (29 18:08 -0500)
committerJason Merrill <jason@redhat.com>
Thu, 30 Nov 2023 04:55:55 +0000 (29 23:55 -0500)
tree17c63774d9f37ac013a8d0f5e64ead434eee060e
parentfc7b70fa3497664a58b3c0b36fa94f9ec87d4f22
c++: remove LAMBDA_EXPR_MUTABLE_P

In review of the deducing 'this' patch it came up that LAMBDA_EXPR_MUTABLE_P
doesn't make sense for a lambda with an explicit object parameter.  And it
was never necessary, so let's remove it.

gcc/cp/ChangeLog:

* cp-tree.h (LAMBDA_EXPR_MUTABLE_P): Remove.
* cp-tree.def: Remove documentation.
* lambda.cc (build_lambda_expr): Remove reference.
* parser.cc (cp_parser_lambda_declarator_opt): Likewise.
* pt.cc (tsubst_lambda_expr): Likewise.
* ptree.cc (cxx_print_lambda_node): Likewise.
* semantics.cc (capture_decltype): Get the object quals
from the object instead.
gcc/cp/cp-tree.def
gcc/cp/cp-tree.h
gcc/cp/lambda.cc
gcc/cp/parser.cc
gcc/cp/pt.cc
gcc/cp/ptree.cc
gcc/cp/semantics.cc