Skip to content

[AST] NFC: Rename ParameterInfoList::isPassedToSendableParameter to… #75991

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions include/swift/AST/Types.h
Original file line number Diff line number Diff line change
Expand Up @@ -3836,7 +3836,7 @@ struct ParameterListInfo {
SmallBitVector implicitSelfCapture;
SmallBitVector inheritActorContext;
SmallBitVector variadicGenerics;
SmallBitVector isPassedToSending;
SmallBitVector sendingParameters;

public:
ParameterListInfo() { }
Expand Down Expand Up @@ -3869,7 +3869,7 @@ struct ParameterListInfo {
bool isVariadicGenericParameter(unsigned paramIdx) const;

/// Returns true if this is a sending parameter.
bool isPassedToSendingParameter(unsigned paramIdx) const;
bool isSendingParameter(unsigned paramIdx) const;

/// Retrieve the number of non-defaulted parameters.
unsigned numNonDefaultedParameters() const {
Expand Down
8 changes: 4 additions & 4 deletions lib/AST/Type.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1304,7 +1304,7 @@ ParameterListInfo::ParameterListInfo(
implicitSelfCapture.resize(params.size());
inheritActorContext.resize(params.size());
variadicGenerics.resize(params.size());
isPassedToSending.resize(params.size());
sendingParameters.resize(params.size());

// No parameter owner means no parameter list means no default arguments
// - hand back the zeroed bitvector.
Expand Down Expand Up @@ -1370,7 +1370,7 @@ ParameterListInfo::ParameterListInfo(
}

if (param->isSending()) {
isPassedToSending.set(i);
sendingParameters.set(i);
}
}
}
Expand Down Expand Up @@ -1412,8 +1412,8 @@ bool ParameterListInfo::isVariadicGenericParameter(unsigned paramIdx) const {
: false;
}

bool ParameterListInfo::isPassedToSendingParameter(unsigned paramIdx) const {
return paramIdx < isPassedToSending.size() ? isPassedToSending[paramIdx]
bool ParameterListInfo::isSendingParameter(unsigned paramIdx) const {
return paramIdx < sendingParameters.size() ? sendingParameters[paramIdx]
: false;
}

Expand Down
3 changes: 1 addition & 2 deletions lib/Sema/CSApply.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6206,8 +6206,7 @@ ArgumentList *ExprRewriter::coerceCallArguments(
// implicit self capture or inheriting actor context.
bool isImplicitSelfCapture = paramInfo.isImplicitSelfCapture(paramIdx);
bool inheritsActorContext = paramInfo.inheritsActorContext(paramIdx);
bool isPassedToSendingParameter =
paramInfo.isPassedToSendingParameter(paramIdx);
bool isPassedToSendingParameter = paramInfo.isSendingParameter(paramIdx);

applyContextualClosureFlags(argExpr, isImplicitSelfCapture,
inheritsActorContext,
Expand Down