[SourceKit] DocInfo: Update the UIdent for synthesized extensions to respect the synthesized targets instead of the original extended types.

This commit is contained in:
Xi Ge
2016-03-31 18:11:14 -07:00
parent 7cb49d7f4b
commit 8afcf65fa2
5 changed files with 41 additions and 21 deletions

View File

@@ -300,7 +300,11 @@ static bool initDocEntityInfo(const Decl *D, const Decl *SynthesizedTarget,
return false;
}
Info.Kind = SwiftLangSupport::getUIDForDecl(D, IsRef);
if (IsSynthesizedExtension)
Info.Kind = SwiftLangSupport::getUIDForExtensionOfDecl(SynthesizedTarget);
else
Info.Kind = SwiftLangSupport::getUIDForDecl(D, IsRef);
if (Info.Kind.isInvalid())
return true;
if (const ValueDecl *VD = dyn_cast<ValueDecl>(D)) {