diff options
author | Eli Friedman <eli.friedman@gmail.com> | 2012-02-03 01:39:09 +0000 |
---|---|---|
committer | Eli Friedman <eli.friedman@gmail.com> | 2012-02-03 01:39:09 +0000 |
commit | d67d0cc40f31956b40b44b6ee3619d17a0f73294 (patch) | |
tree | 243d9d747b338e4edb785aefc37093ba4807627e /lib/Sema/SemaExprCXX.cpp | |
parent | 05072804cfba9f5635d126b14c136e3887e0a0c0 (diff) |
Note whether a lambda is mutable in the LambdaScopeInfo; this information will be necessary to handle references to captured variables.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149660 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaExprCXX.cpp')
-rw-r--r-- | lib/Sema/SemaExprCXX.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/Sema/SemaExprCXX.cpp b/lib/Sema/SemaExprCXX.cpp index 6542629d35..1ff6f59bae 100644 --- a/lib/Sema/SemaExprCXX.cpp +++ b/lib/Sema/SemaExprCXX.cpp @@ -4946,6 +4946,8 @@ void Sema::ActOnStartOfLambdaDefinition(LambdaIntroducer &Intro, 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(), |