aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaExprCXX.cpp
diff options
context:
space:
mode:
authorEli Friedman <eli.friedman@gmail.com>2012-02-03 01:39:09 +0000
committerEli Friedman <eli.friedman@gmail.com>2012-02-03 01:39:09 +0000
commitd67d0cc40f31956b40b44b6ee3619d17a0f73294 (patch)
tree243d9d747b338e4edb785aefc37093ba4807627e /lib/Sema/SemaExprCXX.cpp
parent05072804cfba9f5635d126b14c136e3887e0a0c0 (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.cpp2
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(),