Hide _UnderscoredProtocols in code completion

We explicitly whitelist these "stdlib private" decls in interface
generation, because they may contain methods that users are required to
implement.  But in code-completion, there's no good reason to show them.
We still show completions for the methods themselves if you complete on
a public protocol that inherits from the private protocol. So,

<complete> => doesn't show _CollectionType

let a: CollectionType = ...
a.<complete> => *does* show startIndex, which comes from _CollectionType

rdar://problem/20086106

Swift SVN r26355
This commit is contained in:
Ben Langmuir
2015-03-20 17:14:08 +00:00
parent 3f6a14ade6
commit fff41e472e
4 changed files with 21 additions and 6 deletions

View File

@@ -1733,7 +1733,7 @@ public:
// Implement swift::VisibleDeclConsumer.
void foundDecl(ValueDecl *D, DeclVisibilityKind Reason) override {
// Hide private stdlib declarations.
if (D->isPrivateStdlibDecl())
if (D->isPrivateStdlibDecl(/*whitelistProtocols*/false))
return;
if (AvailabilityAttr::isUnavailable(D))
return;