Skip to content

Commit a725955

Browse files
committed
More renaming
1 parent 96a0d0e commit a725955

File tree

6 files changed

+12
-10
lines changed

6 files changed

+12
-10
lines changed

lib/AST/ModuleNameLookup.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ void ModuleNameLookup<LookupStrategy>::lookupInModule(
145145

146146
const size_t initialCount = decls.size();
147147
size_t currentCount = decls.size();
148-
bool includeInlineable = options & NL_IncludeUsableFromInline;
148+
bool includeUsableFromInline = options & NL_IncludeUsableFromInline;
149149

150150
auto updateNewDecls = [&](const DeclContext *moduleScopeContext) {
151151
if (decls.size() == currentCount)
@@ -157,7 +157,8 @@ void ModuleNameLookup<LookupStrategy>::lookupInModule(
157157
if (resolutionKind == ResolutionKind::TypesOnly && !isa<TypeDecl>(VD))
158158
return true;
159159
if (respectAccessControl &&
160-
!VD->isAccessibleFrom(moduleScopeContext, false, includeInlineable))
160+
!VD->isAccessibleFrom(moduleScopeContext, false,
161+
includeUsableFromInline))
161162
return true;
162163
return false;
163164
});

lib/AST/NameLookup.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1502,8 +1502,9 @@ static bool isAcceptableLookupResult(const DeclContext *dc,
15021502
// Check access.
15031503
if (!(options & NL_IgnoreAccessControl) &&
15041504
!dc->getASTContext().isAccessControlDisabled()) {
1505-
bool allowInlinable = options & NL_IncludeUsableFromInline;
1506-
return decl->isAccessibleFrom(dc, /*forConformance*/ false, allowInlinable);
1505+
bool allowUsableFromInline = options & NL_IncludeUsableFromInline;
1506+
return decl->isAccessibleFrom(dc, /*forConformance*/ false,
1507+
allowUsableFromInline);
15071508
}
15081509

15091510
return true;

lib/Sema/TypeCheckDecl.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2190,7 +2190,7 @@ static Type validateParameterType(ParamDecl *decl) {
21902190
options |= TypeResolutionFlags::Direct;
21912191

21922192
if (dc->isInSpecializeExtensionContext())
2193-
options |= TypeResolutionFlags::AllowInlinable;
2193+
options |= TypeResolutionFlags::AllowUsableFromInline;
21942194

21952195
const auto resolution =
21962196
TypeResolution::forInterface(dc, options, unboundTyOpener);
@@ -2727,7 +2727,7 @@ ExtendedTypeRequest::evaluate(Evaluator &eval, ExtensionDecl *ext) const {
27272727
// Compute the extended type.
27282728
TypeResolutionOptions options(TypeResolverContext::ExtensionBinding);
27292729
if (ext->isInSpecializeExtensionContext())
2730-
options |= TypeResolutionFlags::AllowInlinable;
2730+
options |= TypeResolutionFlags::AllowUsableFromInline;
27312731
const auto resolution = TypeResolution::forStructural(
27322732
ext->getDeclContext(), options,
27332733
[](auto unboundTy) {

lib/Sema/TypeCheckGeneric.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -905,7 +905,7 @@ RequirementRequest::evaluate(Evaluator &evaluator,
905905
// Figure out the type resolution.
906906
auto options = TypeResolutionOptions(TypeResolverContext::GenericRequirement);
907907
if (owner.dc->isInSpecializeExtensionContext())
908-
options |= TypeResolutionFlags::AllowInlinable;
908+
options |= TypeResolutionFlags::AllowUsableFromInline;
909909
Optional<TypeResolution> resolution;
910910
switch (stage) {
911911
case TypeResolutionStage::Structural:

lib/Sema/TypeCheckType.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1322,7 +1322,7 @@ static Type resolveTopLevelIdentTypeComponent(TypeResolution resolution,
13221322
}
13231323

13241324
NameLookupOptions lookupOptions = defaultUnqualifiedLookupOptions;
1325-
if (options.contains(TypeResolutionFlags::AllowInlinable))
1325+
if (options.contains(TypeResolutionFlags::AllowUsableFromInline))
13261326
lookupOptions |= NameLookupFlags::IncludeUsableFromInline;
13271327
auto globals = TypeChecker::lookupUnqualifiedType(DC, id, comp->getLoc(),
13281328
lookupOptions);
@@ -1526,7 +1526,7 @@ static Type resolveNestedIdentTypeComponent(TypeResolution resolution,
15261526

15271527
// Look for member types with the given name.
15281528
NameLookupOptions lookupOptions = defaultMemberLookupOptions;
1529-
if (options.contains(TypeResolutionFlags::AllowInlinable))
1529+
if (options.contains(TypeResolutionFlags::AllowUsableFromInline))
15301530
lookupOptions |= NameLookupFlags::IncludeUsableFromInline;
15311531
LookupTypeResult memberTypes;
15321532
if (parentTy->mayHaveMembers())

lib/Sema/TypeCheckType.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ enum class TypeResolutionFlags : uint16_t {
6666
AllowModule = 1 << 9,
6767

6868
/// Make internal @usableFromInline and @inlinable decls visible.
69-
AllowInlinable = 1 << 10,
69+
AllowUsableFromInline = 1 << 10,
7070
};
7171

7272
/// Type resolution contexts that require special handling.

0 commit comments

Comments
 (0)