Skip to content

Commit 09e2077

Browse files
committed
Remove diag::descriptive_decl_declared_here
It was used in one place to handle accessors, which happily is no longer necessary.
1 parent 1b81c3d commit 09e2077

File tree

3 files changed

+3
-13
lines changed

3 files changed

+3
-13
lines changed

include/swift/AST/DiagnosticsSema.def

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,6 @@ NOTE(name_declared_here,none,
3434
"%0 declared here", (DeclName))
3535
NOTE(kind_declared_here,none,
3636
"%0 declared here", (DescriptiveDeclKind))
37-
NOTE(descriptive_decl_declared_here,none,
38-
"'%0' declared here", (StringRef))
3937
NOTE(implicit_member_declared_here,none,
4038
"%kindbase0 is implicitly declared", (const ValueDecl *))
4139
NOTE(extended_type_declared_here,none,

lib/Sema/TypeCheckAvailability.cpp

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3571,15 +3571,7 @@ diagnoseDeclAsyncAvailability(const ValueDecl *D, SourceRange R,
35713571
if (const AbstractFunctionDecl *asyncAlt = afd->getAsyncAlternative()) {
35723572
SourceLoc diagLoc = call ? call->getLoc() : R.Start;
35733573
ctx.Diags.diagnose(diagLoc, diag::warn_use_async_alternative);
3574-
if (auto *accessor = dyn_cast<AccessorDecl>(asyncAlt)) {
3575-
SmallString<32> name;
3576-
llvm::raw_svector_ostream os(name);
3577-
accessor->printUserFacingName(os);
3578-
ctx.Diags.diagnose(asyncAlt->getLoc(),
3579-
diag::descriptive_decl_declared_here, name);
3580-
} else {
3581-
asyncAlt->diagnose(diag::decl_declared_here, asyncAlt);
3582-
}
3574+
asyncAlt->diagnose(diag::decl_declared_here, asyncAlt);
35833575
}
35843576
}
35853577

test/attr/attr_availability_async_rename.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,10 +118,10 @@ struct SomeStruct {
118118
// expected-note@+1 2 {{'staticStructFunc()' declared here}}
119119
static func staticStructFunc() async { }
120120

121-
// expected-note@+1 3 {{'getter:instanceProp()' declared here}}
121+
// expected-note@+1 3 {{getter for 'instanceProp' declared here}}
122122
var instanceProp: Int { get async { 1 } }
123123
var regInstanceProp: Int { get { 1 } set { } }
124-
// expected-note@+1 {{'getter:classProp()' declared here}}
124+
// expected-note@+1 {{getter for 'classProp' declared here}}
125125
static var classProp: Int { get async { 1 } }
126126

127127
@available(*, renamed: "getter:instanceProp()")

0 commit comments

Comments
 (0)