Skip to content

Commit f64bf5f

Browse files
committed
[AST] NFC: Rename ParameterInfoList::isPassedToSendableParameter to isSendableParameter
Just like other members of that type, `isPassedToSendableParameter` bit set tracks information per parameter. The "passed" bit is applicable to the argument rather than the parameter itself so it should bit kept on the `AbstractClosureExpr`.
1 parent 9315673 commit f64bf5f

File tree

3 files changed

+7
-8
lines changed

3 files changed

+7
-8
lines changed

include/swift/AST/Types.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3836,7 +3836,7 @@ struct ParameterListInfo {
38363836
SmallBitVector implicitSelfCapture;
38373837
SmallBitVector inheritActorContext;
38383838
SmallBitVector variadicGenerics;
3839-
SmallBitVector isPassedToSending;
3839+
SmallBitVector sendingParameters;
38403840

38413841
public:
38423842
ParameterListInfo() { }
@@ -3869,7 +3869,7 @@ struct ParameterListInfo {
38693869
bool isVariadicGenericParameter(unsigned paramIdx) const;
38703870

38713871
/// Returns true if this is a sending parameter.
3872-
bool isPassedToSendingParameter(unsigned paramIdx) const;
3872+
bool isSendingParameter(unsigned paramIdx) const;
38733873

38743874
/// Retrieve the number of non-defaulted parameters.
38753875
unsigned numNonDefaultedParameters() const {

lib/AST/Type.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1304,7 +1304,7 @@ ParameterListInfo::ParameterListInfo(
13041304
implicitSelfCapture.resize(params.size());
13051305
inheritActorContext.resize(params.size());
13061306
variadicGenerics.resize(params.size());
1307-
isPassedToSending.resize(params.size());
1307+
sendingParameters.resize(params.size());
13081308

13091309
// No parameter owner means no parameter list means no default arguments
13101310
// - hand back the zeroed bitvector.
@@ -1370,7 +1370,7 @@ ParameterListInfo::ParameterListInfo(
13701370
}
13711371

13721372
if (param->isSending()) {
1373-
isPassedToSending.set(i);
1373+
sendingParameters.set(i);
13741374
}
13751375
}
13761376
}
@@ -1412,8 +1412,8 @@ bool ParameterListInfo::isVariadicGenericParameter(unsigned paramIdx) const {
14121412
: false;
14131413
}
14141414

1415-
bool ParameterListInfo::isPassedToSendingParameter(unsigned paramIdx) const {
1416-
return paramIdx < isPassedToSending.size() ? isPassedToSending[paramIdx]
1415+
bool ParameterListInfo::isSendingParameter(unsigned paramIdx) const {
1416+
return paramIdx < sendingParameters.size() ? sendingParameters[paramIdx]
14171417
: false;
14181418
}
14191419

lib/Sema/CSApply.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6206,8 +6206,7 @@ ArgumentList *ExprRewriter::coerceCallArguments(
62066206
// implicit self capture or inheriting actor context.
62076207
bool isImplicitSelfCapture = paramInfo.isImplicitSelfCapture(paramIdx);
62086208
bool inheritsActorContext = paramInfo.inheritsActorContext(paramIdx);
6209-
bool isPassedToSendingParameter =
6210-
paramInfo.isPassedToSendingParameter(paramIdx);
6209+
bool isPassedToSendingParameter = paramInfo.isSendingParameter(paramIdx);
62116210

62126211
applyContextualClosureFlags(argExpr, isImplicitSelfCapture,
62136212
inheritsActorContext,

0 commit comments

Comments
 (0)