mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Fix MSVC errors and warnings.
This commit is contained in:
parent
6a2a946200
commit
e06768e8b5
@ -49,7 +49,7 @@ bool NameAndTypeResolver::registerDeclarations(SourceUnit& _sourceUnit)
|
||||
{
|
||||
DeclarationRegistrationHelper registrar(m_scopes, _sourceUnit, m_errors);
|
||||
}
|
||||
catch (FatalError const& _e)
|
||||
catch (FatalError const&)
|
||||
{
|
||||
if (m_errors.empty())
|
||||
throw; // Something is weird here, rather throw again.
|
||||
@ -146,7 +146,7 @@ bool NameAndTypeResolver::resolveNamesAndTypes(ContractDefinition& _contract)
|
||||
if (!success)
|
||||
return false;
|
||||
}
|
||||
catch (FatalError const& _e)
|
||||
catch (FatalError const&)
|
||||
{
|
||||
if (m_errors.empty())
|
||||
throw; // Something is weird here, rather throw again.
|
||||
@ -162,7 +162,7 @@ bool NameAndTypeResolver::updateDeclaration(Declaration const& _declaration)
|
||||
m_scopes[nullptr].registerDeclaration(_declaration, false, true);
|
||||
solAssert(_declaration.scope() == nullptr, "Updated declaration outside global scope.");
|
||||
}
|
||||
catch (FatalError const& _error)
|
||||
catch (FatalError const&)
|
||||
{
|
||||
if (m_errors.empty())
|
||||
throw; // Something is weird here, rather throw again.
|
||||
|
@ -49,6 +49,7 @@ bool ReferencesResolver::visit(UserDefinedTypeName const& _typeName)
|
||||
fatalDeclarationError(_typeName.location(), "Identifier not found or not unique.");
|
||||
|
||||
_typeName.annotation().referencedDeclaration = declaration;
|
||||
|
||||
_typeName.annotation().contractScope = m_currentContract;
|
||||
return true;
|
||||
}
|
||||
@ -59,7 +60,7 @@ bool ReferencesResolver::resolve(ASTNode& _root)
|
||||
{
|
||||
_root.accept(*this);
|
||||
}
|
||||
catch (FatalError const& e)
|
||||
catch (FatalError const&)
|
||||
{
|
||||
solAssert(m_errorOccurred, "");
|
||||
}
|
||||
|
@ -43,7 +43,7 @@ class SourceUnit;
|
||||
class Why3Translator: private ASTConstVisitor
|
||||
{
|
||||
public:
|
||||
Why3Translator(ErrorList& _errors): m_lines{{std::string(), 0}}, m_errors(_errors) {}
|
||||
Why3Translator(ErrorList& _errors): m_lines(std::vector<Line>{{std::string(), 0}}), m_errors(_errors) {}
|
||||
|
||||
/// Appends formalisation of the given source unit to the output.
|
||||
/// @returns false on error.
|
||||
|
@ -88,7 +88,7 @@ ASTPointer<SourceUnit> Parser::parse(shared_ptr<Scanner> const& _scanner)
|
||||
}
|
||||
return nodeFactory.createNode<SourceUnit>(nodes);
|
||||
}
|
||||
catch (FatalError const& _error)
|
||||
catch (FatalError const&)
|
||||
{
|
||||
if (m_errors.empty())
|
||||
throw; // Something is weird here, rather throw again.
|
||||
|
Loading…
Reference in New Issue
Block a user