[AST] InitAccessors: Requestify a "has init accessor" check

This commit is contained in:
Pavel Yaskevich
2023-06-15 13:05:25 -07:00
parent 8b1c9c9be8
commit d1554f2f59
5 changed files with 36 additions and 3 deletions

View File

@@ -6720,6 +6720,12 @@ Type AbstractStorageDecl::getValueInterfaceType() const {
return cast<SubscriptDecl>(this)->getElementInterfaceType();
}
bool AbstractStorageDecl::hasInitAccessor() const {
return evaluateOrDefault(
getASTContext().evaluator,
HasInitAccessorRequest{const_cast<AbstractStorageDecl *>(this)}, false);
}
VarDecl::VarDecl(DeclKind kind, bool isStatic, VarDecl::Introducer introducer,
SourceLoc nameLoc, Identifier name,
DeclContext *dc, StorageIsMutable_t supportsMutation)