Skip to content

Commit eee7207

Browse files
committed
[NFC] rename preprocessType
1 parent d6e6c96 commit eee7207

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

lib/AST/Type.cpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,9 @@ static bool alwaysNoncopyable(Type ty) {
177177
return false; // otherwise, the conservative assumption is it's copyable.
178178
}
179179

180-
static CanType preprocessType(GenericEnvironment *env, Type orig) {
180+
/// Preprocesses a type before querying whether it conforms to an invertible.
181+
static CanType preprocessTypeForInvertibleQuery(GenericEnvironment *env,
182+
Type orig) {
181183
Type type = orig;
182184

183185
// Always strip off SILMoveOnlyWrapper.
@@ -196,7 +198,7 @@ static CanType preprocessType(GenericEnvironment *env, Type orig) {
196198

197199
/// \returns true iff this type lacks conformance to Copyable.
198200
bool TypeBase::isNoncopyable(GenericEnvironment *env) {
199-
auto canType = preprocessType(env, this);
201+
auto canType = preprocessTypeForInvertibleQuery(env, this);
200202
auto &ctx = canType->getASTContext();
201203

202204
// for legacy-mode queries that are not dependent on conformances to Copyable
@@ -208,7 +210,7 @@ bool TypeBase::isNoncopyable(GenericEnvironment *env) {
208210
}
209211

210212
bool TypeBase::isEscapable(GenericEnvironment *env) {
211-
auto canType = preprocessType(env, this);
213+
auto canType = preprocessTypeForInvertibleQuery(env, this);
212214
auto &ctx = canType->getASTContext();
213215

214216
// for legacy-mode queries that are not dependent on conformances to Escapable

0 commit comments

Comments
 (0)