diff options
author | Nathan Froyd <froydnj@codesourcery.com> | 2011-05-06 17:03:08 +0000 |
---|---|---|
committer | Nathan Froyd <froydnj@gcc.gnu.org> | 2011-05-06 17:03:08 +0000 |
commit | 7e1352fe55aa8c9573c9a3e9e3d6d8eed3e879d6 (patch) | |
tree | 0bea53352609d3a6f12f4add666223863889cc00 /gcc/cp/decl2.c | |
parent | 54cc9874fd081f49c678daa8dc97299e89d9a000 (diff) | |
download | gcc-7e1352fe55aa8c9573c9a3e9e3d6d8eed3e879d6.zip gcc-7e1352fe55aa8c9573c9a3e9e3d6d8eed3e879d6.tar.gz gcc-7e1352fe55aa8c9573c9a3e9e3d6d8eed3e879d6.tar.bz2 |
introduce {class,type}_of_this_parm functions
introduce {class,type}_of_this_parm functions
* cp-tree.h (type_of_this_parm, class_of_this_parm): New functions.
* call.c (standard_conversion): Call class_of_this_parm.
* cxx-pretty-print.c (pp_cxx_implicit_parameter_type): Likewise.
(pp_cxx_direct_abstract_declarator): Likewise.
* decl2.c (change_return_type): Likewise.
(cp_reconstruct_complex_type): Likewise.
* error.c (dump_type_suffix, dump_function_decl): Likewise.
* mangle.c (write_function_type): Likewise.
* pt.c (unify): Likewise.
* typeck.c (merge_types, type_memfn_quals): Likewise.
* decl.c (build_this_parm): Call type_of_this_parm.
From-SVN: r173496
Diffstat (limited to 'gcc/cp/decl2.c')
-rw-r--r-- | gcc/cp/decl2.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/gcc/cp/decl2.c b/gcc/cp/decl2.c index ef8de31..2e08dd7 100644 --- a/gcc/cp/decl2.c +++ b/gcc/cp/decl2.c @@ -161,8 +161,7 @@ change_return_type (tree new_ret, tree fntype) } else newtype = build_method_type_directly - (TREE_TYPE (TREE_VALUE (TYPE_ARG_TYPES (fntype))), - new_ret, TREE_CHAIN (args)); + (class_of_this_parm (fntype), new_ret, TREE_CHAIN (args)); if (raises) newtype = build_exception_variant (newtype, raises); if (attrs) @@ -1249,8 +1248,7 @@ cp_reconstruct_complex_type (tree type, tree bottom) so we must compensate by getting rid of it. */ outer = build_method_type_directly - (TREE_TYPE (TREE_VALUE (TYPE_ARG_TYPES (type))), - inner, + (class_of_this_parm (type), inner, TREE_CHAIN (TYPE_ARG_TYPES (type))); } else if (TREE_CODE (type) == OFFSET_TYPE) |