Skip to content

Commit e9d81e1

Browse files
author
Harlan Haskins
authored
Merge pull request swiftlang#22190 from harlanhaskins/show-me-the-protocol
[ParseableInterfaces] Print @_show_in_interface
2 parents bcdc9e7 + 393b162 commit e9d81e1

File tree

3 files changed

+7
-1
lines changed

3 files changed

+7
-1
lines changed

include/swift/AST/PrintOptions.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -258,6 +258,7 @@ struct PrintOptions {
258258
/// List of attribute kinds that should not be printed.
259259
std::vector<AnyAttrKind> ExcludeAttrList = {DAK_Transparent, DAK_Effects,
260260
DAK_FixedLayout,
261+
DAK_ShowInInterface,
261262
DAK_ImplicitlyUnwrappedOptional};
262263

263264
/// List of attribute kinds that should be printed exclusively.

lib/AST/Attr.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -374,7 +374,6 @@ bool DeclAttribute::printImpl(ASTPrinter &Printer, const PrintOptions &Options,
374374
case DAK_RawDocComment:
375375
case DAK_ObjCBridged:
376376
case DAK_SynthesizedProtocol:
377-
case DAK_ShowInInterface:
378377
case DAK_Rethrows:
379378
case DAK_Infix:
380379
return false;
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
// RUN: %target-swift-frontend -typecheck %s -parse-stdlib -emit-parseable-module-interface-path - | %FileCheck %s
2+
3+
// CHECK: @_show_in_interface public protocol _UnderscoredProtocol {
4+
// CHECK-NEXT: }
5+
@_show_in_interface
6+
public protocol _UnderscoredProtocol {}

0 commit comments

Comments
 (0)