/// explicit captures.
unsigned NumExplicitCaptures;
+ bool Mutable;
+
LambdaScopeInfo(DiagnosticsEngine &Diag, CXXRecordDecl *Lambda)
: CapturingScopeInfo(Diag, ImpCap_None), Lambda(Lambda),
- NumExplicitCaptures(0)
+ NumExplicitCaptures(0), Mutable(false)
{
Kind = SK_Lambda;
}
else if (Intro.Default == LCD_ByRef)
LSI->ImpCaptureStyle = LambdaScopeInfo::ImpCap_LambdaByref;
+ LSI->Mutable = (Method->getTypeQualifiers() & Qualifiers::Const) == 0;
+
// Handle explicit captures.
for (llvm::SmallVector<LambdaCapture, 4>::const_iterator
C = Intro.Captures.begin(),