Remove a dedicated error flag from ReferencesResolver

This commit is contained in:
a3d4 2020-05-12 23:23:01 +02:00
parent d7b434fc6b
commit 6dbf23d52a
2 changed files with 2 additions and 5 deletions

View File

@ -44,8 +44,9 @@ namespace solidity::frontend
bool ReferencesResolver::resolve(ASTNode const& _root)
{
auto errorWatcher = m_errorReporter.errorWatcher();
_root.accept(*this);
return !m_errorOccurred;
return errorWatcher.ok();
}
bool ReferencesResolver::visit(Block const& _block)
@ -267,19 +268,16 @@ void ReferencesResolver::operator()(yul::VariableDeclaration const& _varDecl)
void ReferencesResolver::declarationError(SourceLocation const& _location, string const& _description)
{
m_errorOccurred = true;
m_errorReporter.declarationError(8532_error, _location, _description);
}
void ReferencesResolver::declarationError(SourceLocation const& _location, SecondarySourceLocation const& _ssl, string const& _description)
{
m_errorOccurred = true;
m_errorReporter.declarationError(3881_error, _location, _ssl, _description);
}
void ReferencesResolver::fatalDeclarationError(SourceLocation const& _location, string const& _description)
{
m_errorOccurred = true;
m_errorReporter.fatalDeclarationError(6546_error, _location, _description);
}

View File

@ -103,7 +103,6 @@ private:
/// Stack of return parameters.
std::vector<ParameterList const*> m_returnParameters;
bool const m_resolveInsideCode;
bool m_errorOccurred = false;
InlineAssemblyAnnotation* m_yulAnnotation = nullptr;
bool m_yulInsideFunction = false;