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:
@@ -218,9 +218,9 @@ void CodeCompletionResultBuilder::setAssociatedDecl(const Decl *D) {
|
||||
CurrentModule = MD;
|
||||
}
|
||||
|
||||
if (D->getAttrs().isDeprecated(D->getASTContext()))
|
||||
if (D->isDeprecated())
|
||||
setContextFreeNotRecommended(ContextFreeNotRecommendedReason::Deprecated);
|
||||
else if (D->getAttrs().getSoftDeprecated(D->getASTContext()))
|
||||
else if (D->getSoftDeprecatedAttr())
|
||||
setContextFreeNotRecommended(
|
||||
ContextFreeNotRecommendedReason::SoftDeprecated);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user