mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[SourceKit] DocInfo: Update the printed doc comment for synthesized extensions therefore it reflects the synthesized targets explicitly. rdar://25439820
This commit is contained in:
@@ -434,6 +434,18 @@ void SwiftLangSupport::printFullyAnnotatedDeclaration(const ValueDecl *VD,
|
||||
VD->print(Printer, PO);
|
||||
}
|
||||
|
||||
|
||||
void SwiftLangSupport::
|
||||
printFullyAnnotatedSynthesizedExtension(swift::ExtensionDecl * Extension,
|
||||
swift::NominalTypeDecl *Target,
|
||||
llvm::raw_ostream &OS) {
|
||||
FullyAnnotatedDeclarationPrinter Printer(OS);
|
||||
PrintOptions PO = PrintOptions::printQuickHelpDeclaration();
|
||||
SynthesizedExtensionAnalyzer Analyzer(Target, PO);
|
||||
PO.initArchetypeTransformerForSynthesizedExtensions(Target, &Analyzer);
|
||||
Extension->print(Printer, PO);
|
||||
}
|
||||
|
||||
template <typename FnTy>
|
||||
void walkRelatedDecls(const ValueDecl *VD, const FnTy &Fn) {
|
||||
llvm::SmallDenseMap<DeclName, unsigned, 16> NamesSeen;
|
||||
|
||||
Reference in New Issue
Block a user