mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[ConsumeAddrChecker] Check inout_aliasable args.
Such values can be referenced in a `ConsumeExpr`, so the checker must check them. Furthermore it's legal to consume such values some of the time.
This commit is contained in:
@@ -2466,7 +2466,8 @@ class ConsumeOperatorCopyableAddressesCheckerPass
|
||||
if (arg->getType().isAddress() &&
|
||||
(arg->hasConvention(SILArgumentConvention::Indirect_In) ||
|
||||
arg->hasConvention(SILArgumentConvention::Indirect_In_Guaranteed) ||
|
||||
arg->hasConvention(SILArgumentConvention::Indirect_Inout)))
|
||||
arg->hasConvention(SILArgumentConvention::Indirect_Inout) ||
|
||||
arg->hasConvention(SILArgumentConvention::Indirect_InoutAliasable)))
|
||||
addressesToCheck.insert(arg);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user