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.c24
1 files changed, 4 insertions, 20 deletions
diff --git a/gcc/cp/name-lookup.c b/gcc/cp/name-lookup.c
index 0dcaf65..242e30f 100644
--- a/gcc/cp/name-lookup.c
+++ b/gcc/cp/name-lookup.c
@@ -3797,25 +3797,9 @@ constructor_name_p (tree name, tree type)
return false;
}
-/* Counter used to create anonymous type names. */
-
-static GTY(()) int anon_cnt;
-
-/* Return an IDENTIFIER which can be used as a name for
- unnamed structs and unions. */
-
-tree
-make_anon_name (void)
-{
- char buf[32];
-
- sprintf (buf, anon_aggrname_format (), anon_cnt++);
- return get_identifier (buf);
-}
-
-/* This code is practically identical to that for creating
- anonymous names, but is just used for lambdas instead. This isn't really
- necessary, but it's convenient to avoid treating lambdas like other
+/* This code is practically identical to that for creating anonymous
+ names, but is just used for lambdas instead. This isn't really
+ necessary, but it's convenient to avoid mistaking lambdas for other
unnamed types. */
static GTY(()) int lambda_cnt = 0;
@@ -5982,7 +5966,7 @@ consider_binding_level (tree name, best_match <tree, const char *> &bm,
/* Don't suggest names that are for anonymous aggregate types, as
they are an implementation detail generated by the compiler. */
- if (anon_aggrname_p (suggestion))
+ if (IDENTIFIER_ANON_P (suggestion))
continue;
const char *suggestion_str = IDENTIFIER_POINTER (suggestion);