aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/parser.c
diff options
context:
space:
mode:
authorNathan Sidwell <nathan@acm.org>2020-08-14 16:53:43 -0700
committerNathan Sidwell <nathan@acm.org>2020-08-14 16:55:35 -0700
commitf00008b45ade9e63edf785838b34f5e55909af5e (patch)
tree5969a610a4d5c4e3af6a545e8d68fe116785cdb8 /gcc/cp/parser.c
parent866626efd749ed3e2b7014e88e4340b5a4c73560 (diff)
downloadgcc-f00008b45ade9e63edf785838b34f5e55909af5e.zip
gcc-f00008b45ade9e63edf785838b34f5e55909af5e.tar.gz
gcc-f00008b45ade9e63edf785838b34f5e55909af5e.tar.bz2
c++: Final bit of name-lookup api simplification
We no longer need to give name_lookup_real not name_lookup_nonclass different names to the name_lookup functions. This renames the lookup functions thusly. gcc/cp/ * name-lookup.h (lookup_name_real, lookup_name_nonclass): Rename to ... (lookup_name): ... these new overloads. * name-lookup.c (identifier_type_value_1): Rename lookup_name_real call. (lookup_name_real_1): Rename to ... (lookup_name_1): ... here. (lookup_name_real): Rename to ... (lookup_name): ... here. Rename lookup_name_real_1 call. (lookup_name_nonclass): Delete. * call.c (build_operator_new_call): Rename lookup_name_real call. (add_operator_candidates): Likewise. (build_op_delete_call): Rename lookup_name_nonclass call. * parser.c (cp_parser_lookup_name): Likewise. * pt.c (tsubst_friend_class, lookup_init_capture_pack): Likewise. (tsubst_expr): Likewise. * semantics.c (capture_decltype): Likewise. libcc1/ * libcp1plugin.cc (plugin_build_dependent_expr): Rename lookup_name_real call.
Diffstat (limited to 'gcc/cp/parser.c')
-rw-r--r--gcc/cp/parser.c22
1 files changed, 10 insertions, 12 deletions
diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c
index 641cedb..7cc2dbe 100644
--- a/gcc/cp/parser.c
+++ b/gcc/cp/parser.c
@@ -28213,7 +28213,7 @@ cp_parser_nested_requirement (cp_parser *parser)
/* Support Functions */
-/* Return the appropriate prefer_type argument for lookup_name_real based on
+/* Return the appropriate prefer_type argument for lookup_name based on
tag_type. */
static inline LOOK_want
@@ -28455,22 +28455,20 @@ cp_parser_lookup_name (cp_parser *parser, tree name,
if (!decl)
/* Look it up in the enclosing context. DR 141: When looking for a
template-name after -> or ., only consider class templates. */
- decl = lookup_name_real (name, LOOK_where::ALL,
- is_namespace ? LOOK_want::NAMESPACE
- /* DR 141: When looking in the
- current enclosing context for a
- template-name after -> or ., only
- consider class templates. */
- : is_template ? LOOK_want::TYPE
- : prefer_type_arg (tag_type));
+ decl = lookup_name (name, is_namespace ? LOOK_want::NAMESPACE
+ /* DR 141: When looking in the
+ current enclosing context for a
+ template-name after -> or ., only
+ consider class templates. */
+ : is_template ? LOOK_want::TYPE
+ : prefer_type_arg (tag_type));
parser->object_scope = object_type;
parser->qualifying_scope = NULL_TREE;
}
else
{
- decl = lookup_name_real (name, LOOK_where::ALL,
- is_namespace ? LOOK_want::NAMESPACE
- : prefer_type_arg (tag_type));
+ decl = lookup_name (name, is_namespace ? LOOK_want::NAMESPACE
+ : prefer_type_arg (tag_type));
parser->qualifying_scope = NULL_TREE;
parser->object_scope = NULL_TREE;
}