Make sure to hide constructors with underscored API names as private stdlib symbols.

This completely removes 'Builtin.<type>' from the interface.
The changes in stdlib interface were reviewed by Dmitri.
This commit is contained in:
Argyrios Kyrtzidis
2016-06-01 22:30:48 -07:00
parent 8053070b42
commit b9d3d8909b
3 changed files with 8 additions and 5 deletions

View File

@@ -424,6 +424,9 @@ bool Decl::isPrivateStdlibDecl(bool whitelistProtocols) const {
for (auto param : *params) {
if (param->hasName() && param->getNameStr().startswith("_"))
return true;
auto argName = param->getArgumentName();
if (!argName.empty() && argName.str().startswith("_"))
return true;
}
return false;
};