[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

@@ -360,7 +360,7 @@ ModuleDecl::ModuleDecl(Identifier name, ASTContext &ctx)
setInterfaceType(ModuleType::get(this));
// validateDecl() should return immediately given a ModuleDecl.
setValidationStarted();
setValidationToChecked();
setAccess(AccessLevel::Public);
}