[AST] NFC: Formalize Decl validation tracking via RAII

After this change, RAII ensures that the validation state is accurate as
possible.
This commit is contained in:
David Zarzycki
2018-05-16 07:51:05 -04:00
parent 274114d4a2
commit b29d2784ed
14 changed files with 173 additions and 136 deletions

View File

@@ -1521,7 +1521,7 @@ void TypeChecker::completePropertyBehaviorParameter(VarDecl *VD,
Parameter->setInterfaceType(SubstInterfaceTy);
Parameter->setGenericEnvironment(genericEnv);
Parameter->setValidationStarted();
Parameter->setValidationToChecked();
// Mark the method to be final, implicit, and private. In a class, this
// prevents it from being dynamically dispatched.
@@ -2510,7 +2510,7 @@ swift::createDesignatedInitOverride(TypeChecker &tc,
ctor->setGenericEnvironment(genericEnv);
tc.configureInterfaceType(ctor, genericSig);
ctor->setValidationStarted();
ctor->setValidationToChecked();
configureDesignatedInitAttributes(tc, classDecl,
ctor, superclassCtor);