On Feb 13, 2012, at 7:38 PM, Eli Friedman wrote:

> On Mon, Feb 13, 2012 at 2:00 PM, Douglas Gregor <[email protected]> wrote:
>> Author: dgregor
>> Date: Mon Feb 13 16:00:16 2012
>> New Revision: 150417
>> 
>> URL: http://llvm.org/viewvc/llvm-project?rev=150417&view=rev
>> Log:
>> Introduce support for template instantiation of lambda
>> expressions. This is mostly a simple refact, splitting the main "start
>> a lambda expression" function into smaller chunks that are driven
>> either from the parser (Sema::ActOnLambdaExpr) or during AST
>> transformation (TreeTransform::TransformLambdaExpr). A few minor
>> interesting points:
>> 
>>  - Added new entry points for TreeTransform, so that we can
>>  explicitly establish the link between the lambda closure type in the
>>  template and the lambda closure type in the instantiation.
>>  - Added a bit into LambdaExpr specifying whether it had an explicit
>>  result type or not. We should have had this anyway.
>> 
>> This code is 'lightly' tested.
> 
> Tried testing a bit; hjere's a testcase which isn't working:
> 
> template<int x> void f(int y) { [y]{ return [=]{ return x+y; }; }()(); }
> void g() { f<10>(10); }


Seems fine with r150347.

        - Doug
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to