From d8140cda31a4139dd997838b7dbf9acd45b15be7 Mon Sep 17 00:00:00 2001 From: Marek Polacek Date: Tue, 13 Jan 2026 12:13:45 -0500 Subject: [PATCH] Remove code in check_out_of_consteval_use --- gcc/cp/reflect.cc | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/gcc/cp/reflect.cc b/gcc/cp/reflect.cc index b4ac3ef3425..e615c1addd7 100644 --- a/gcc/cp/reflect.cc +++ b/gcc/cp/reflect.cc @@ -8132,16 +8132,6 @@ check_out_of_consteval_use (tree expr, bool complain/*=true*/) if (!flag_reflection || in_immediate_context ()) return false; - /* Don't complain if we're generating the body for a synthesized method. */ - if (current_function_decl) - { - if (DECL_CONSTRUCTOR_P (current_function_decl) - && DECL_ARTIFICIAL (current_function_decl)) - return false; - if (decl_in_std_meta_p (current_function_decl)) - return false; - } - auto walker = [](tree *tp, int *walk_subtrees, void *) -> tree { tree t = *tp;