[cfe-dev] Evaluating lambda function return type

Amila Jayasekara thejaka.amila at gmail.com
Wed Sep 17 21:35:46 PDT 2014


Hi All,

In an input program I have following code;

auto f = [&z](int y)->int {

      return 5 * y + z;

}

I am trying to figure out where we build the type of the lambda expression
(i.e. lambda is a function that has type, int->int)

So far I checked in "Sema::ActOnStartOfLambdaDefinition" (in
SemaLambda.cpp). But still I am unable to figure out the exact location
where we build the type of the lambda expression.

Can someone please help me to figure out where clang build the return type
for lambda functions ?

Also where do we bind "f" to the return type of lambda function ?

Thank you

Regards

-Thejaka Amila
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20140918/0b5bf39b/attachment.html>


More information about the cfe-dev mailing list