File tree Expand file tree Collapse file tree 2 files changed +16
-1
lines changed Expand file tree Collapse file tree 2 files changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -991,7 +991,9 @@ void PrintAST::printAttributes(const Decl *D) {
991
991
}
992
992
993
993
// SPI groups
994
- if (Options.PrintSPIs ) {
994
+ if (Options.PrintSPIs &&
995
+ DeclAttribute::canAttributeAppearOnDeclKind (
996
+ DAK_SPIAccessControl, D->getKind ())) {
995
997
interleave (D->getSPIGroups (),
996
998
[&](Identifier spiName) {
997
999
Printer.printAttrName (" _spi" , true );
Original file line number Diff line number Diff line change @@ -88,6 +88,19 @@ private class PrivateClassLocal {}
88
88
// CHECK-PUBLIC-NOT: extensionSPIMethod
89
89
}
90
90
91
+ @_spi ( LocalSPI) public protocol SPIProto3 {
92
+ // CHECK-PRIVATE: @_spi(LocalSPI) public protocol SPIProto3
93
+ // CHECK-PUBLIC-NOT: SPIProto3
94
+
95
+ associatedtype AssociatedType
96
+ // CHECK-PRIVATE: {{^}} associatedtype AssociatedType
97
+ // CHECK-PUBLIC-NOT: AssociatedType
98
+
99
+ func implicitSPIMethod( )
100
+ // CHECK-PRIVATE: @_spi(LocalSPI) func implicitSPIMethod()
101
+ // CHECK-PUBLIC-NOT: implicitSPIMethod
102
+ }
103
+
91
104
// Test the dummy conformance printed to replace private types used in
92
105
// conditional conformances. rdar://problem/63352700
93
106
You can’t perform that action at this time.
0 commit comments