Skip to content

Commit b009770

Browse files
committed
[FixCode] Protocol stubs shouldn't print any @ attributes.
This also addresses @jrose-apple's code review comments.
1 parent c5af4c3 commit b009770

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/Sema/TypeCheckProtocol.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2654,7 +2654,7 @@ printRequirementStub(ValueDecl *Requirement, DeclContext *Adopter,
26542654
Options.PrintDocumentationComments = false;
26552655
Options.AccessibilityFilter = Accessibility::Private;
26562656
Options.PrintAccessibility = false;
2657-
Options.ExcludeAttrList.push_back(DAK_Available);
2657+
Options.SkipAttributes = true;
26582658
Options.FunctionBody = [](const ValueDecl *VD) { return getCodePlaceholder(); };
26592659
Options.setBaseType(AdopterTy);
26602660
Options.CurrentModule = Adopter->getParentModule();

test/decl/protocol/conforms/fixit_stub_editor.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// RUN: %target-typecheck-verify-swift -diagnostics-editor-mode
22

33
protocol P1 {
4-
@available(*, introduced: 999)
4+
@available(*, deprecated)
55
func foo1()
66
func foo2()
77
}

0 commit comments

Comments
 (0)