mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[Serialization] Skip SPI documentation in swiftdoc files
Hide comments from SPI decls in all swiftdoc files. This applies the same restrictions as private declarations. This is a temporary solution, a long term fix is to emit both a public and an internal swiftdoc file. rdar://63729195
This commit is contained in:
@@ -344,6 +344,11 @@ static bool shouldIncludeDecl(Decl *D, bool ExcludeDoubleUnderscore) {
|
||||
if (VD->getEffectiveAccess() < swift::AccessLevel::Public)
|
||||
return false;
|
||||
}
|
||||
|
||||
// Skip SPI decls.
|
||||
if (D->isSPI())
|
||||
return false;
|
||||
|
||||
if (auto *ED = dyn_cast<ExtensionDecl>(D)) {
|
||||
return shouldIncludeDecl(ED->getExtendedNominal(), ExcludeDoubleUnderscore);
|
||||
}
|
||||
@@ -745,7 +750,7 @@ Result.X.Column = Locs->X.Column;
|
||||
};
|
||||
// .swiftdoc doesn't include comments for double underscored symbols, but
|
||||
// for .swiftsourceinfo, having the source location for these symbols isn't
|
||||
// a concern becuase these symbols are in .swiftinterface anyway.
|
||||
// a concern because these symbols are in .swiftinterface anyway.
|
||||
if (!shouldIncludeDecl(D, /*ExcludeDoubleUnderscore*/false))
|
||||
return false;
|
||||
if (!shouldSerializeSourceLoc(D))
|
||||
|
||||
Reference in New Issue
Block a user