aboutsummaryrefslogtreecommitdiff
path: root/gcc/c
diff options
context:
space:
mode:
authorPatrick Palka <ppalka@redhat.com>2023-09-05 10:17:44 -0400
committerPatrick Palka <ppalka@redhat.com>2023-09-05 10:17:44 -0400
commitad82d19d6a66d7b28e9e181d6d55404802a77784 (patch)
tree1b3a6ec8efe16879b5106e008ab3e572459f229e /gcc/c
parentd820cd785bd6b832ce5cadc177e2b212d349395c (diff)
downloadgcc-ad82d19d6a66d7b28e9e181d6d55404802a77784.zip
gcc-ad82d19d6a66d7b28e9e181d6d55404802a77784.tar.gz
gcc-ad82d19d6a66d7b28e9e181d6d55404802a77784.tar.bz2
c++: use conversion_obstack_sentinel throughout
This replaces direct calls to conversion_obstack_alloc(0) and obstack_free with the recently added conversion_obstack_sentinel. In passing, I noticed build_user_type_conversion and build_operator_new_call don't free their conversion_obstack allocations, so this patch also uses this SFINAE helper in those two entry points. gcc/cp/ChangeLog: * call.cc (build_user_type_conversion): Free allocated conversions. (build_converted_constant_expr_internal): Use conversion_obstack_sentinel instead. (perform_dguide_overload_resolution): Likewise. (build_new_function_call): Likewise. (build_operator_new_call): Free allocated conversions. (build_op_call): Use conversion_obstack_sentinel instead. (build_conditional_expr): Use conversion_obstack_sentinel instead, and hoist it out to the outermost scope. (build_new_op): Use conversion_obstack_sentinel instead and set it up before the first goto. Remove second unneeded goto. (build_op_subscript): Use conversion_obstack_sentinel instead. (ref_conv_binds_to_temporary): Likewise. (build_new_method_call): Likewise. (can_convert_arg): Likewise. (can_convert_arg_bad): Likewise. (perform_implicit_conversion_flags): Likewise. (perform_direct_initialization_if_possible): Likewise. (initialize_reference): Likewise.
Diffstat (limited to 'gcc/c')
0 files changed, 0 insertions, 0 deletions