[cfe-dev] CurContext during variable capture for Lambda

Manjunath Kudlur keveman at gmail.com
Tue Dec 25 16:39:05 PST 2012


I was going through the Sema::tryCaptureVariable function. I noticed that
when PerformCopyInitialization is called for variables of record types, it
eventually does the lookup and resolution of the copy constructor for those
types. During that entire machinery, the Sema::CurContext is set to the
MethodDecl of the operator() of the Lambda. Given that the copy actually
happens outside the operator() of the lambda, shouldn't CurContext point to
the parent context during that time? Or am I missing something?

Manjunath
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20121225/6984166c/attachment.html>


More information about the cfe-dev mailing list