mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[SourceKit] DocInfo: Update the UIdent for synthesized extensions to respect the synthesized targets instead of the original extended types.
This commit is contained in:
@@ -277,6 +277,21 @@ UIdent SwiftLangSupport::getUIDForDecl(const Decl *D, bool IsRef) {
|
||||
return UIdentVisitor(IsRef).visit(const_cast<Decl*>(D));
|
||||
}
|
||||
|
||||
UIdent SwiftLangSupport::getUIDForExtensionOfDecl(const Decl *D) {
|
||||
switch (D->getKind()) {
|
||||
case swift::DeclKind::Struct:
|
||||
return KindDeclExtensionStruct;
|
||||
case swift::DeclKind::Enum:
|
||||
return KindDeclExtensionEnum;
|
||||
case swift::DeclKind::Class:
|
||||
return KindDeclExtensionClass;
|
||||
case swift::DeclKind::Protocol:
|
||||
return KindDeclExtensionProtocol;
|
||||
default:
|
||||
llvm_unreachable("cannot have extension.");
|
||||
}
|
||||
}
|
||||
|
||||
UIdent SwiftLangSupport::getUIDForLocalVar(bool IsRef) {
|
||||
return IsRef ? KindRefVarLocal : KindDeclVarLocal;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user