[SourceKit] Add Effective Scope to Index

This commit is contained in:
Bruno Rocha
2020-05-24 15:53:13 +02:00
parent 9bde41ac37
commit 2a48e19ff0
8 changed files with 650 additions and 0 deletions

View File

@@ -134,6 +134,13 @@ private:
if (!isRef) {
uidAttrs = getDeclAttributeUIDs(symbol.decl);
info.Attrs = uidAttrs;
if (auto *VD = dyn_cast<ValueDecl>(symbol.decl)) {
if (symbol.symInfo.Kind != SymbolKind::Extension) {
AccessScope accessScope = VD->getFormalAccessScope();
UIdent AttrUID = SwiftLangSupport::getUIDForFormalAccessScope(accessScope);
info.EffectiveAccessLevel = AttrUID;
}
}
}
return func(info);
}