Remove DeclValidationRAII

The last real client was precedence group validation.
This commit is contained in:
Robert Widmann
2019-10-18 11:19:07 -07:00
parent 6bb0e49eab
commit 48b8ba3614
3 changed files with 7 additions and 5 deletions

View File

@@ -2783,8 +2783,13 @@ bool ValueDecl::hasInterfaceType() const {
return !TypeAndAccess.getPointer().isNull();
}
static bool isComputingInterfaceType(const ValueDecl *VD) {
return VD->getASTContext().evaluator.hasActiveRequest(
InterfaceTypeRequest{const_cast<ValueDecl *>(VD)});
}
bool ValueDecl::isRecursiveValidation() const {
if (hasValidationStarted() && !hasInterfaceType())
if (isComputingInterfaceType(this) && !hasInterfaceType())
return true;
if (auto *vd = dyn_cast<VarDecl>(this))