mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Merge pull request #80159 from AnthonyLatsis/danaus-plexippus-5
Sema: Extend adoption mode for `AsyncCallerExecution` to storage declarations
This commit is contained in:
@@ -451,11 +451,8 @@ static bool initDocEntityInfo(const Decl *D,
|
||||
Info.IsUnavailable = D->isUnavailable();
|
||||
Info.IsDeprecated = D->isDeprecated();
|
||||
Info.IsOptional = D->getAttrs().hasAttribute<OptionalAttr>();
|
||||
if (auto *AFD = dyn_cast<AbstractFunctionDecl>(D)) {
|
||||
Info.IsAsync = AFD->hasAsync();
|
||||
} else if (auto *Storage = dyn_cast<AbstractStorageDecl>(D)) {
|
||||
if (auto *Getter = Storage->getAccessor(AccessorKind::Get))
|
||||
Info.IsAsync = Getter->hasAsync();
|
||||
if (auto *valueDecl = dyn_cast<ValueDecl>(D)) {
|
||||
Info.IsAsync = valueDecl->isAsync();
|
||||
}
|
||||
|
||||
if (!IsRef) {
|
||||
|
||||
Reference in New Issue
Block a user