mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[Index] Don't index non-public imported declarations (#25865)
Apart from mildly speeding up indexing, this also keeps the compiler from running into issues with implementation-only imports that may not be present while we're trying to index. rdar://problem/52083709
This commit is contained in:
@@ -2961,7 +2961,7 @@ getAccessScopeForFormalAccess(const ValueDecl *VD,
|
||||
if (resultDC->isLocalContext() || access == AccessLevel::Private)
|
||||
return AccessScope(resultDC, /*private*/true);
|
||||
|
||||
if (auto enclosingNominal = dyn_cast<NominalTypeDecl>(resultDC)) {
|
||||
if (auto enclosingNominal = dyn_cast<GenericTypeDecl>(resultDC)) {
|
||||
auto enclosingAccess =
|
||||
getAdjustedFormalAccess(enclosingNominal, useDC,
|
||||
treatUsableFromInlineAsPublic);
|
||||
|
||||
Reference in New Issue
Block a user