diff options
author | Nathan Sidwell <nathan@acm.org> | 2017-06-26 16:38:40 +0000 |
---|---|---|
committer | Nathan Sidwell <nathan@gcc.gnu.org> | 2017-06-26 16:38:40 +0000 |
commit | d6ef53f2413b5fde30a6d9516c4ebf087e6a4363 (patch) | |
tree | f5118cecea9bdf4e8f1e7e2cf9925022e8215fa4 /gcc/cp/decl.c | |
parent | 0ffdc300784ca80b28639f6d276b48a3dc6138b1 (diff) | |
download | gcc-d6ef53f2413b5fde30a6d9516c4ebf087e6a4363.zip gcc-d6ef53f2413b5fde30a6d9516c4ebf087e6a4363.tar.gz gcc-d6ef53f2413b5fde30a6d9516c4ebf087e6a4363.tar.bz2 |
cp-tree.h (lang_decl_fn): Remove assignment_operator_p field.
gcc/cp/
* cp-tree.h (lang_decl_fn): Remove assignment_operator_p field.
(DECL_COMPLETE_CONSTRUCTOR_P): Directly compare
identifier.
(DECL_BASE_CONSTRUCTOR_P, DECL_COMPLETE_DESTRUCTOR_P)
DECL_BASE_DESTRUCTOR_P, DECL_DELETING_DESTRUCTOR_P): Likewise.
(DECL_ASSIGNMENT_OPERATOR_P): Use IDENTIFIER_ASSIGN_OP_P.
* decl.c (grok_op_properties): Adjust identifier checking.
* init.c (expand_default_init): Adjust identifier descision.
* method.c (implicitly_declare_fn): Don't use
DECL_ASSIGNMENT_OPERATOR_P.
* search.c (lookup_fnfields_1): Use IDENTIFIER_CTOR_P,
IDENTIFIER_DTOR_P.
* call.c (in_charge_arg_for_name): Reimplement.
(build_special_member_call): Use IDENTIFIER_CDTOR_P,
IDENTIFIER_DTOR_P.
libcc1/
* libcp1plugin.cc (plugin_build_decl): Don't set
DECL_ASSIGNMENT_OPERATOR_P.
(--This line, and those below, will be ignored--
M gcc/cp/init.c
M gcc/cp/decl.c
M gcc/cp/method.c
M gcc/cp/cp-tree.h
M gcc/cp/call.c
M gcc/cp/search.c
M gcc/cp/ChangeLog
M libcc1/ChangeLog
M libcc1/libcp1plugin.cc
From-SVN: r249657
Diffstat (limited to 'gcc/cp/decl.c')
-rw-r--r-- | gcc/cp/decl.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c index 0361357..93e24fc 100644 --- a/gcc/cp/decl.c +++ b/gcc/cp/decl.c @@ -12925,14 +12925,15 @@ grok_op_properties (tree decl, bool complain) { /* It'd be nice to hang something else of the identifier to find CODE more directly. */ + bool assign_op = IDENTIFIER_ASSIGN_OP_P (name); const operator_name_info_t *oni - = (IDENTIFIER_ASSIGN_OP_P (name) - ? assignment_operator_name_info : operator_name_info); - DECL_ASSIGNMENT_OPERATOR_P (decl) = IDENTIFIER_ASSIGN_OP_P (name); + = (assign_op ? assignment_operator_name_info : operator_name_info); + if (false) ; #define DEF_OPERATOR(NAME, CODE, MANGLING, ARITY, KIND) \ - else if (oni[int (CODE)].identifier == name) \ + else if (assign_op == (KIND == cik_assign_op) \ + && oni[int (CODE)].identifier == name) \ operator_code = (CODE); #include "operators.def" #undef DEF_OPERATOR |