mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Excise "Accessibility" from the compiler (3/3)
"Accessibility" has a different meaning for app developers, so we've already deliberately excised it from our diagnostics in favor of terms like "access control" and "access level". Do the same in the compiler now that we aren't constantly pulling things into the release branch. Rename AccessibilityAttr to AccessControlAttr and SetterAccessibilityAttr to SetterAccessAttr, then track down the last few uses of "accessibility" that don't have to do with NSAccessibility. (I left the SourceKit XPC API alone because that's supposed to be more stable.)
This commit is contained in:
@@ -583,7 +583,7 @@ bool DeclContext::isInnermostContextGeneric() const {
|
||||
bool
|
||||
DeclContext::isCascadingContextForLookup(bool functionsAreNonCascading) const {
|
||||
// FIXME: This is explicitly checking for attributes in some cases because
|
||||
// it can be called before accessibility is computed.
|
||||
// it can be called before access control is computed.
|
||||
switch (getContextKind()) {
|
||||
case DeclContextKind::AbstractClosureExpr:
|
||||
break;
|
||||
@@ -633,7 +633,7 @@ DeclContext::isCascadingContextForLookup(bool functionsAreNonCascading) const {
|
||||
if (extension->hasDefaultAccessLevel())
|
||||
return extension->getDefaultAccessLevel() > AccessLevel::FilePrivate;
|
||||
// FIXME: duplicated from computeDefaultAccessLevel in TypeCheckDecl.cpp.
|
||||
if (auto *AA = extension->getAttrs().getAttribute<AccessibilityAttr>())
|
||||
if (auto *AA = extension->getAttrs().getAttribute<AccessControlAttr>())
|
||||
return AA->getAccess() > AccessLevel::FilePrivate;
|
||||
if (Type extendedTy = extension->getExtendedType()) {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user