ASTPrinter: Remove printWithCompatibilityFeatureChecks() from printSynthesizedExtensionIfNeeded()

This path was not exercised in the test suite, and when the
PrimaryAssociatedTypes feature finally (incorrectly) triggered it,
it would print '#endifextension'.
This commit is contained in:
Slava Pestov
2022-04-06 23:44:54 -04:00
parent edbbf48898
commit b16498c3df
2 changed files with 24 additions and 11 deletions

View File

@@ -650,17 +650,8 @@ public:
printer << " {}";
};
bool printedNewline = false;
if (printOptions.PrintCompatibilityFeatureChecks) {
printedNewline =
printWithCompatibilityFeatureChecks(printer, curPrintOptions,
proto, printBody);
} else {
printBody();
printedNewline = false;
}
if (!printedNewline)
printer << "\n";
printBody();
printer << "\n";
}
}