Skip to content

Commit 4bba768

Browse files
committed
Comment SIL ownership checker for the @guaranteed case.
1 parent fd99f4d commit 4bba768

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lib/SIL/SILOwnershipVerifier.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1097,6 +1097,10 @@ visitFullApply(FullApplySite apply) {
10971097
return {true, UseLifetimeConstraint::MustBeLive};
10981098
case ParameterConvention::Indirect_In_Guaranteed:
10991099
case ParameterConvention::Direct_Guaranteed:
1100+
// A +1 value may be passed to a guaranteed argument. From the caller's
1101+
// point of view, this is just like a normal non-consuming use.
1102+
// Direct_Guaranteed only accepts non-trivial types, but trivial types are
1103+
// already handled above.
11001104
return visitApplyParameter(ValueOwnershipKind::Any,
11011105
UseLifetimeConstraint::MustBeLive);
11021106
// The following conventions should take address types.

0 commit comments

Comments
 (0)