aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/name-lookup.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/cp/name-lookup.c')
-rw-r--r--gcc/cp/name-lookup.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/gcc/cp/name-lookup.c b/gcc/cp/name-lookup.c
index 4cf1380..e2e5450 100644
--- a/gcc/cp/name-lookup.c
+++ b/gcc/cp/name-lookup.c
@@ -3923,7 +3923,7 @@ remove_hidden_names (tree fns)
possible candidates. */
void
-suggest_alternatives_for (tree name)
+suggest_alternatives_for (location_t location, tree name)
{
VEC(tree,heap) *candidates = NULL;
VEC(tree,heap) *namespaces_to_search = NULL;
@@ -3931,7 +3931,6 @@ suggest_alternatives_for (tree name)
int n_searched = 0;
tree t;
unsigned ix;
- location_t name_location;
VEC_safe_push (tree, heap, namespaces_to_search, global_namespace);
@@ -3955,15 +3954,13 @@ suggest_alternatives_for (tree name)
VEC_safe_push (tree, heap, namespaces_to_search, t);
}
- name_location = location_of (name);
-
/* If we stopped before we could examine all namespaces, inform the
user. Do this even if we don't have any candidates, since there
might be more candidates further down that we weren't able to
find. */
if (n_searched >= max_to_search
&& !VEC_empty (tree, namespaces_to_search))
- inform (name_location,
+ inform (location,
"maximum limit of %d namespaces searched for %qE",
max_to_search, name);
@@ -3973,7 +3970,7 @@ suggest_alternatives_for (tree name)
if (VEC_empty (tree, candidates))
return;
- inform_n (name_location, VEC_length (tree, candidates),
+ inform_n (location, VEC_length (tree, candidates),
"suggested alternative:",
"suggested alternatives:");