mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
The list of decls provided by a file should not include private decls.
Part of rdar://problem/15353101 Swift SVN r22928
This commit is contained in:
@@ -79,6 +79,9 @@ func lookUpManyTopLevelNames() {
|
||||
_ = OtherFileAliasForSecret.constant
|
||||
}
|
||||
|
||||
// NEGATIVE-NOT: privateFunc{{$}}
|
||||
private func privateFunc() {}
|
||||
|
||||
// CHECK-LABEL: {{^member-access:$}}
|
||||
// CHECK-DAG: V4main10IntWrapper{{$}}
|
||||
// CHECK-DAG: C4main18ClassFromOtherFile{{$}}
|
||||
|
||||
@@ -115,9 +115,15 @@ static bool emitReferenceDependencies(DiagnosticEngine &diags,
|
||||
case DeclKind::Class:
|
||||
case DeclKind::Protocol:
|
||||
case DeclKind::Var:
|
||||
case DeclKind::Func:
|
||||
case DeclKind::Func: {
|
||||
auto *VD = cast<ValueDecl>(D);
|
||||
if (VD->hasAccessibility() &&
|
||||
VD->getAccessibility() == Accessibility::Private) {
|
||||
break;
|
||||
}
|
||||
out << "\t" << cast<ValueDecl>(D)->getName() << "\n";
|
||||
break;
|
||||
}
|
||||
|
||||
case DeclKind::PatternBinding:
|
||||
case DeclKind::TopLevelCode:
|
||||
|
||||
Reference in New Issue
Block a user