[ModulePrint] Add the initial implementation for printing synthesized extensions.

For a concrete type, members from its conforming protocols' extensions can be hard
to manually surface. In this commit, when printing Swift modules, we start to replicate these
extensions and synthesize them as if they are the concrete type's native extensions.

Credit to Doug for suggesting this practice.
This commit is contained in:
Xi Ge
2016-01-27 13:45:29 -08:00
parent 35bce55e62
commit ae60159816
9 changed files with 353 additions and 66 deletions

View File

@@ -287,7 +287,7 @@ static bool getModuleInterfaceInfo(ASTContext &Ctx,
AnnotatingPrinter Printer(Info, OS);
printSubmoduleInterface(Mod, SplitModuleName,
TraversalOptions,
Printer, Options);
Printer, Options, false);
Info.Text = OS.str();
return false;