Skip to content

Commit 8c0495f

Browse files
committed
swift-module-digester: drop isSDKPrivate() from node since filtering should happen at AST level.
1 parent 49c1692 commit 8c0495f

File tree

3 files changed

+1
-13
lines changed

3 files changed

+1
-13
lines changed

tools/swift-api-digester/ModuleAnalyzerNodes.cpp

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -377,14 +377,6 @@ StringRef SDKNodeDecl::getScreenInfo() const {
377377
return Ctx.buffer(OS.str());
378378
}
379379

380-
bool SDKNodeDecl::isSDKPrivate() const {
381-
if (getName().startswith("__"))
382-
return true;
383-
if (auto *PD = dyn_cast<SDKNodeDecl>(getParent()))
384-
return PD->isSDKPrivate();
385-
return false;
386-
}
387-
388380
void SDKNodeDecl::printFullyQualifiedName(llvm::raw_ostream &OS) const {
389381
std::vector<NodePtr> Parent;
390382
for (auto *P = getParent(); isa<SDKNodeDecl>(P); P = P->getParent())

tools/swift-api-digester/ModuleAnalyzerNodes.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,6 @@ class SDKNodeDecl: public SDKNode {
320320
DeclKind getDeclKind() const { return DKind; }
321321
void printFullyQualifiedName(llvm::raw_ostream &OS) const;
322322
StringRef getFullyQualifiedName() const;
323-
bool isSDKPrivate() const;
324323
bool isDeprecated() const { return IsDeprecated; };
325324
bool isProtocolRequirement() const { return IsProtocolReq; }
326325
bool hasDeclAttribute(DeclAttrKind DAKind) const;

tools/swift-api-digester/swift-api-digester.cpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -848,8 +848,7 @@ void swift::ide::api::SDKNodeDeclVar::diagnose(SDKNode *Right) {
848848
}
849849

850850
static bool shouldDiagnoseType(SDKNodeType *T) {
851-
return T->isTopLevelType() &&
852-
!cast<SDKNodeDecl>(T->getParent())->isSDKPrivate();
851+
return T->isTopLevelType();
853852
}
854853

855854
void swift::ide::api::SDKNodeType::diagnose(SDKNode *Right) {
@@ -1914,8 +1913,6 @@ void DiagnosisEmitter::handle(const SDKNodeDecl *Node, NodeAnnotation Anno) {
19141913
}
19151914

19161915
void DiagnosisEmitter::visitDecl(SDKNodeDecl *Node) {
1917-
if (Node->isSDKPrivate())
1918-
return;
19191916
std::vector<NodeAnnotation> Scratch;
19201917
for (auto Anno : Node->getAnnotations(Scratch))
19211918
handle(Node, Anno);

0 commit comments

Comments
 (0)