<div dir="ltr">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?<div>
<br></div><div>Manjunath</div></div>