File tree Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -90,6 +90,8 @@ PrintOptions PrintOptions::printTextualInterfaceFile() {
90
90
// the default to 'public' and mark the 'internal' things.
91
91
result.PrintAccess = true ;
92
92
93
+ result.ExcludeAttrList .push_back (DAK_AccessControl);
94
+
93
95
// FIXME: We'll need the actual default parameter expression.
94
96
result.PrintDefaultParameterPlaceholder = false ;
95
97
@@ -493,8 +495,10 @@ class PrintAST : public ASTVisitor<PrintAST> {
493
495
}
494
496
495
497
void printAccess (const ValueDecl *D) {
496
- if (!Options.PrintAccess || !D->hasAccess () ||
497
- D->getAttrs ().hasAttribute <AccessControlAttr>())
498
+ if (!Options.PrintAccess || !D->hasAccess ())
499
+ return ;
500
+ if (D->getAttrs ().hasAttribute <AccessControlAttr>() &&
501
+ !llvm::is_contained (Options.ExcludeAttrList , DAK_AccessControl))
498
502
return ;
499
503
500
504
printAccess (D->getFormalAccess ());
Original file line number Diff line number Diff line change @@ -60,8 +60,7 @@ extension PublicProto {
60
60
@usableFromInline internal func ufiMethod( ) { }
61
61
} // CHECK: {{^[}]$}}
62
62
63
- // FIXME: We shouldn't print access on extensions in textual interface files.
64
- // CHECK: {{^}}public extension PublicProto {{[{]$}}
63
+ // CHECK: {{^}}extension PublicProto {{[{]$}}
65
64
public extension PublicProto {
66
65
// CHECK: public func publicExtPublicMethod(){{$}}
67
66
func publicExtPublicMethod( ) { }
You can’t perform that action at this time.
0 commit comments