aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Sema/ScopeInfo.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/Sema/ScopeInfo.cpp')
-rw-r--r--clang/lib/Sema/ScopeInfo.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/clang/lib/Sema/ScopeInfo.cpp b/clang/lib/Sema/ScopeInfo.cpp
index 92ce513..ce90451 100644
--- a/clang/lib/Sema/ScopeInfo.cpp
+++ b/clang/lib/Sema/ScopeInfo.cpp
@@ -248,6 +248,14 @@ void LambdaScopeInfo::visitPotentialCaptures(
}
}
+bool LambdaScopeInfo::lambdaCaptureShouldBeConst() const {
+ if (ExplicitObjectParameter)
+ return ExplicitObjectParameter->getType()
+ .getNonReferenceType()
+ .isConstQualified();
+ return !Mutable;
+}
+
FunctionScopeInfo::~FunctionScopeInfo() { }
BlockScopeInfo::~BlockScopeInfo() { }
CapturedRegionScopeInfo::~CapturedRegionScopeInfo() { }