[SourceKit] Refactor parameter printing to use its own callbacks NFC

The current approach of visiting the param decl won't work when we want
to visit the parameters of function *types*, or when visiting tuple
elements (which aren't themselves decls).

rdar://problem/24292226
This commit is contained in:
Ben Langmuir
2016-03-02 10:50:31 -08:00
parent 659811e261
commit 1b22116639
5 changed files with 113 additions and 28 deletions

View File

@@ -85,6 +85,13 @@ private:
return OtherPrinter.printSynthesizedExtensionPost(ED, NTD);
}
void printParameterPre(PrintParameterKind Kind) override {
return OtherPrinter.printParameterPre(Kind);
}
void printParameterPost(PrintParameterKind Kind) override {
return OtherPrinter.printParameterPost(Kind);
}
void printNamePre(PrintNameContext Context) override {
return OtherPrinter.printNamePre(Context);
}