diff options
Diffstat (limited to 'gcc/cp/lambda.c')
-rw-r--r-- | gcc/cp/lambda.c | 23 |
1 files changed, 8 insertions, 15 deletions
diff --git a/gcc/cp/lambda.c b/gcc/cp/lambda.c index fb385c6..758773b 100644 --- a/gcc/cp/lambda.c +++ b/gcc/cp/lambda.c @@ -128,22 +128,15 @@ build_lambda_object (tree lambda_expr) tree begin_lambda_type (tree lambda) { - tree type; + /* Lambda names are nearly but not quite anonymous. */ + tree name = make_anon_name (); + IDENTIFIER_LAMBDA_P (name) = true; - { - /* Unique name. This is just like an unnamed class, but we cannot use - make_anon_name because of certain checks against TYPE_UNNAMED_P. */ - tree name; - name = make_lambda_name (); - - /* Create the new RECORD_TYPE for this lambda. */ - type = xref_tag (/*tag_code=*/record_type, - name, - /*scope=*/ts_lambda, - /*template_header_p=*/false); - if (type == error_mark_node) - return error_mark_node; - } + /* Create the new RECORD_TYPE for this lambda. */ + tree type = xref_tag (/*tag_code=*/record_type, name, + /*scope=*/ts_lambda, /*template_header_p=*/false); + if (type == error_mark_node) + return error_mark_node; /* Designate it as a struct so that we can use aggregate initialization. */ CLASSTYPE_DECLARED_CLASS (type) = false; |