re PR c++/50437 ([C++0x] [4.7 regression] ICE for trivial use of lambda in template...
authorJason Merrill <jason@redhat.com>
Thu, 13 Oct 2011 21:23:36 +0000 (17:23 -0400)
committerJason Merrill <jason@gcc.gnu.org>
Thu, 13 Oct 2011 21:23:36 +0000 (17:23 -0400)
commit0e81aa85294d479dea3fb9b5a71e6f7242770af6
tree0b3894e6a191ea60c4236c20d9491127731db082
parentf1c141a7da0daee15591401fa0a24cf71cc4734c
re PR c++/50437 ([C++0x] [4.7 regression] ICE for trivial use of lambda in template function)

PR c++/50437
* cp-tree.h (struct tree_lambda_expr): Add closure field.
(LAMBDA_EXPR_CLOSURE): New.
* pt.c (tsubst_copy_and_build) [LAMBDA_EXPR]: Likewise.
* semantics.c (build_lambda_object): Use it instead of TREE_TYPE.
(begin_lambda_type, lambda_function, add_capture): Likewise.
(add_default_capture, lambda_expr_this_capture): Likewise.

From-SVN: r179944
gcc/cp/ChangeLog
gcc/cp/cp-tree.h
gcc/cp/pt.c
gcc/cp/semantics.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/cpp0x/lambda/lambda-auto1.C [new file with mode: 0644]