]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
c++: remove LAMBDA_EXPR_CAPTURES_THIS_P
authorPatrick Palka <ppalka@redhat.com>
Thu, 30 Jan 2025 15:30:56 +0000 (10:30 -0500)
committerPatrick Palka <ppalka@redhat.com>
Thu, 30 Jan 2025 15:30:56 +0000 (10:30 -0500)
This unused accessor is just a simple alias of LAMBDA_EXPR_THIS_CAPTURE
and contrary to its documentation doesn't use TREE_LANG_FLAG_0.  Might
as well remove it.

gcc/cp/ChangeLog:

* cp-tree.h (LAMBDA_EXPR_CAPTURES_THIS_P): Remove.

Reviewed-by: Jason Merrill <jason@redhat.com>
gcc/cp/cp-tree.h

index 21011d0b003e22aa55aadd03bc5fa630337ee25f..ec976928f5fb0eb25935b47c7b7042cc064756f9 100644 (file)
@@ -429,7 +429,6 @@ extern GTY(()) tree cp_global_trees[CPTI_MAX];
       LAMBDA_CAPTURE_EXPLICIT_P (in a TREE_LIST in LAMBDA_EXPR_CAPTURE_LIST)
       PARENTHESIZED_LIST_P (in the TREE_LIST for a parameter-declaration-list)
       CONSTRUCTOR_IS_DIRECT_INIT (in CONSTRUCTOR)
-      LAMBDA_EXPR_CAPTURES_THIS_P (in LAMBDA_EXPR)
       DECLTYPE_FOR_LAMBDA_CAPTURE (in DECLTYPE_TYPE)
       VEC_INIT_EXPR_IS_CONSTEXPR (in VEC_INIT_EXPR)
       DECL_OVERRIDE_P (in FUNCTION_DECL)
@@ -1543,10 +1542,6 @@ enum cp_lambda_default_capture_mode_type {
 #define LAMBDA_EXPR_THIS_CAPTURE(NODE) \
   (((struct tree_lambda_expr *)LAMBDA_EXPR_CHECK (NODE))->this_capture)
 
-/* Predicate tracking whether `this' is in the effective capture set.  */
-#define LAMBDA_EXPR_CAPTURES_THIS_P(NODE) \
-  LAMBDA_EXPR_THIS_CAPTURE(NODE)
-
 /* True iff uses of a const variable capture were optimized away.  */
 #define LAMBDA_EXPR_CAPTURE_OPTIMIZED(NODE) \
   TREE_LANG_FLAG_2 (LAMBDA_EXPR_CHECK (NODE))