mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Sema: Use a request to compute AbstractStorageDecl::is{Getter,Setter}Mutating()
This commit is contained in:
@@ -2056,6 +2056,18 @@ void AbstractStorageDecl::computeIsValidKeyPathComponent() {
|
||||
setIsValidKeyPathComponent(::isValidKeyPathComponent(this));
|
||||
}
|
||||
|
||||
bool AbstractStorageDecl::isGetterMutating() const {
|
||||
ASTContext &ctx = getASTContext();
|
||||
return evaluateOrDefault(ctx.evaluator,
|
||||
IsGetterMutatingRequest{const_cast<AbstractStorageDecl *>(this)}, {});
|
||||
}
|
||||
|
||||
bool AbstractStorageDecl::isSetterMutating() const {
|
||||
ASTContext &ctx = getASTContext();
|
||||
return evaluateOrDefault(ctx.evaluator,
|
||||
IsSetterMutatingRequest{const_cast<AbstractStorageDecl *>(this)}, {});
|
||||
}
|
||||
|
||||
bool ValueDecl::isInstanceMember() const {
|
||||
DeclContext *DC = getDeclContext();
|
||||
if (!DC->isTypeContext())
|
||||
|
||||
Reference in New Issue
Block a user