Skip to content

Commit a44aae6

Browse files
committed
[nfc] fix closure capture warning
The `selfTy` needs to be captured by value.
1 parent 556c503 commit a44aae6

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/Sema/TypeCheckDecl.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1058,7 +1058,8 @@ NoncopyableAnnotationRequest::evaluate(Evaluator &evaluator,
10581058
// - selfTy : ~TARGET
10591059
// and records them in the `InverseMarking` result.
10601060
auto genWhereClauseVisitor = [&](CanType selfTy, InverseMarking &result) {
1061-
return [&](Requirement req, RequirementRepr *repr) -> bool/*=stop search*/ {
1061+
return [&, selfTy](Requirement req,
1062+
RequirementRepr *repr) -> bool/*=stop search*/ {
10621063
if (req.getKind() != RequirementKind::Conformance)
10631064
return false;
10641065

0 commit comments

Comments
 (0)