mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
AST: Introduce Decl::getDeprecatedAttr().
It replaces `DeclAttr::getDeprecated()` as the designated way to query for the attribute that makes a decl deprecated.
This commit is contained in:
@@ -4243,11 +4243,10 @@ findImportedCaseWithMatchingSuffix(Type instanceTy, DeclNameRef name) {
|
||||
WORSE(== nullptr);
|
||||
|
||||
assert((a && b) && "neither should be null here");
|
||||
ASTContext &ctx = a->getASTContext();
|
||||
|
||||
// Is one more available than the other?
|
||||
WORSE(->isUnavailable());
|
||||
WORSE(->getAttrs().isDeprecated(ctx));
|
||||
WORSE(->isDeprecated());
|
||||
|
||||
// Does one have a shorter name (so the non-matching prefix is shorter)?
|
||||
WORSE(->getName().getBaseName().userFacingName().size());
|
||||
|
||||
Reference in New Issue
Block a user