[PrintAsClang] Don't attempt forward declare marker protocols

This commit is contained in:
Pavel Yaskevich
2023-10-27 16:26:03 -07:00
parent 9dcb921484
commit 1b521a5c69

View File

@@ -326,7 +326,8 @@ public:
(void)addImport(CD);
}
} else if (auto PD = dyn_cast<ProtocolDecl>(TD)) {
forwardDeclare(PD);
if (!PD->isMarkerProtocol())
forwardDeclare(PD);
} else if (auto TAD = dyn_cast<TypeAliasDecl>(TD)) {
bool imported = false;
if (TAD->hasClangNode())