ModulePrinting: Merge synthesized extensions' bodies if they have the common constraints.

This commit is contained in:
Xi Ge
2016-03-10 17:43:39 -08:00
parent 74afb7800c
commit c22e9bcf53
5 changed files with 228 additions and 122 deletions

View File

@@ -594,7 +594,8 @@ static bool passCursorInfoForDecl(const ValueDecl *VD,
bool InSynthesizedExtension = false;
if (BaseType) {
if(auto Target = BaseType->getAnyNominal()) {
SynthesizedExtensionAnalyzer Analyzer(Target);
SynthesizedExtensionAnalyzer Analyzer(Target,
PrintOptions::printInterface());
InSynthesizedExtension = Analyzer.isInSynthesizedExtension(VD);
}
}