aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/method.c
diff options
context:
space:
mode:
authorNathan Sidwell <nathan@acm.org>2017-06-16 15:42:33 +0000
committerNathan Sidwell <nathan@gcc.gnu.org>2017-06-16 15:42:33 +0000
commite249fcad3aea469b27d92ba9ef435ee79fd932d4 (patch)
tree220f75501ce153151b8dfbfe055b13b82def2a43 /gcc/cp/method.c
parent78a8b676f1bd4fb799f3696486f45adde11a32cb (diff)
downloadgcc-e249fcad3aea469b27d92ba9ef435ee79fd932d4.zip
gcc-e249fcad3aea469b27d92ba9ef435ee79fd932d4.tar.gz
gcc-e249fcad3aea469b27d92ba9ef435ee79fd932d4.tar.bz2
cp-tree.h (build_this_parm, [...]): Add FN parm.
gcc/cp/ * cp-tree.h (build_this_parm, cp_build_parm_decl) build_artificial_parm): Add FN parm. * decl.c (start_cleanup_fn): Adjust. (build_this_parm): Add FN parm, pass it through. (grokfndecl): Adjust parm building. * decl2.c (cp_build_parm_decl): Add FN parm, set context. (build_artificial_parm): Add FN parm, pass through. (maybe_retrofit_in_chrg): Adjust parm building. (start_static_storage_duration_function): Likwise. * lambda.c (maybe_aadd_lambda_conv_op): Likewise. * method.c (implicitly_declare_fn): Likewise. * parser.c (inject_this_parameter): Likewise. libcc1/ * libcp1plugin.cc (plugin_build_decl): Adjust parm building. (--This line, and those below, will be ignored-- M gcc/cp/parser.c M gcc/cp/ChangeLog M gcc/cp/decl.c M gcc/cp/lambda.c M gcc/cp/cp-tree.h M gcc/cp/method.c M gcc/cp/decl2.c M libcc1/libcp1plugin.cc M libcc1/ChangeLog From-SVN: r249268
Diffstat (limited to 'gcc/cp/method.c')
-rw-r--r--gcc/cp/method.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/gcc/cp/method.c b/gcc/cp/method.c
index 98d36da..9541fcb 100644
--- a/gcc/cp/method.c
+++ b/gcc/cp/method.c
@@ -2072,7 +2072,7 @@ implicitly_declare_fn (special_function_kind kind, tree type,
/* Note that this parameter is *not* marked DECL_ARTIFICIAL; we
want its type to be included in the mangled function
name. */
- tree decl = cp_build_parm_decl (NULL_TREE, rhs_parm_type);
+ tree decl = cp_build_parm_decl (fn, NULL_TREE, rhs_parm_type);
TREE_READONLY (decl) = 1;
retrofit_lang_decl (decl);
DECL_PARM_INDEX (decl) = DECL_PARM_LEVEL (decl) = 1;
@@ -2085,11 +2085,10 @@ implicitly_declare_fn (special_function_kind kind, tree type,
for (tree parm = inherited_parms; parm && parm != void_list_node;
parm = TREE_CHAIN (parm))
{
- *p = cp_build_parm_decl (NULL_TREE, TREE_VALUE (parm));
+ *p = cp_build_parm_decl (fn, NULL_TREE, TREE_VALUE (parm));
retrofit_lang_decl (*p);
DECL_PARM_LEVEL (*p) = 1;
DECL_PARM_INDEX (*p) = index++;
- DECL_CONTEXT (*p) = fn;
p = &DECL_CHAIN (*p);
}
SET_DECL_INHERITED_CTOR (fn, inherited_ctor);
@@ -2103,7 +2102,7 @@ implicitly_declare_fn (special_function_kind kind, tree type,
constexpr_p = DECL_DECLARED_CONSTEXPR_P (inherited_ctor);
}
/* Add the "this" parameter. */
- this_parm = build_this_parm (fn_type, TYPE_UNQUALIFIED);
+ this_parm = build_this_parm (fn, fn_type, TYPE_UNQUALIFIED);
DECL_CHAIN (this_parm) = DECL_ARGUMENTS (fn);
DECL_ARGUMENTS (fn) = this_parm;