From 806010b9faf8e87d4bbdb01f0912801796f30708 Mon Sep 17 00:00:00 2001 From: Jason Merrill Date: Fri, 17 Jun 2011 16:07:45 -0400 Subject: parser.c (cp_parser_lambda_expression): Clear LAMBDA_EXPR_THIS_CAPTURE after parsing. * parser.c (cp_parser_lambda_expression): Clear LAMBDA_EXPR_THIS_CAPTURE after parsing. * pt.c (tsubst_copy_and_build): Make sure it isn't set. From-SVN: r175156 --- gcc/cp/pt.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'gcc/cp/pt.c') diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c index 308aff7..ca4f955 100644 --- a/gcc/cp/pt.c +++ b/gcc/cp/pt.c @@ -13498,10 +13498,9 @@ tsubst_copy_and_build (tree t, = (LAMBDA_EXPR_DISCRIMINATOR (t)); LAMBDA_EXPR_CAPTURE_LIST (r) = RECUR (LAMBDA_EXPR_CAPTURE_LIST (t)); - LAMBDA_EXPR_THIS_CAPTURE (r) - = RECUR (LAMBDA_EXPR_THIS_CAPTURE (t)); LAMBDA_EXPR_EXTRA_SCOPE (r) = RECUR (LAMBDA_EXPR_EXTRA_SCOPE (t)); + gcc_assert (LAMBDA_EXPR_THIS_CAPTURE (t) == NULL_TREE); /* Do this again now that LAMBDA_EXPR_EXTRA_SCOPE is set. */ determine_visibility (TYPE_NAME (type)); -- cgit v1.1