gcc/cp/ChangeLog: * cp-tree.h (cp_operator_id, cp_assignment_operator_id): Document. diff --git a/gcc/cp/cp-tree.h b/gcc/cp/cp-tree.h index da45d95..234441b 100644 --- a/gcc/cp/cp-tree.h +++ b/gcc/cp/cp-tree.h @@ -1731,9 +1731,16 @@ struct GTY(()) language_function { || (NAME) == cp_operator_id (DELETE_EXPR) \ || (NAME) == cp_operator_id (VEC_DELETE_EXPR)) +/* Evaluates to an id matching operator CODE. Used to obtain the set + of operator overloads for the specified CODE. */ #define cp_operator_id(CODE) \ (operator_name_info[(int) (CODE)].identifier) -#define cp_assignment_operator_id(CODE) \ + +/* An id matching a member assignment operator CODE, both simple (with + CODE == NOP_EXPR) and compound (e.g., with CODE == PLUS_EXPR for +=). + Includes copy assignment. Use copy_fn_p() to test specifically for + copy assignment. */ +#define cp_assignment_operator_id(CODE) \ (assignment_operator_name_info[(int) (CODE)].identifier) /* In parser.c. */ extern tree cp_literal_operator_id (const char *);