mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Merge pull request #8890 from ethereum/fixclangv10
Fix clang v10 compilation errors
This commit is contained in:
commit
e2f7e8a3a7
@ -125,7 +125,7 @@ vector<Declaration const*> GlobalContext::declarations() const
|
||||
{
|
||||
vector<Declaration const*> declarations;
|
||||
declarations.reserve(m_magicVariables.size());
|
||||
for (ASTPointer<Declaration const> const& variable: m_magicVariables)
|
||||
for (ASTPointer<MagicVariableDeclaration const> const& variable: m_magicVariables)
|
||||
declarations.push_back(variable.get());
|
||||
return declarations;
|
||||
}
|
||||
|
@ -43,7 +43,7 @@ void ImmutableValidator::analyze()
|
||||
visitCallableIfNew(*contract->constructor());
|
||||
|
||||
for (ContractDefinition const* contract: linearizedContracts)
|
||||
for (std::shared_ptr<InheritanceSpecifier> const inheritSpec: contract->baseContracts())
|
||||
for (std::shared_ptr<InheritanceSpecifier> const& inheritSpec: contract->baseContracts())
|
||||
if (auto args = inheritSpec->arguments())
|
||||
ASTNode::listAccept(*args, *this);
|
||||
|
||||
|
@ -587,13 +587,13 @@ bool ContractCompiler::visit(FunctionDefinition const& _function)
|
||||
if (!_function.isConstructor())
|
||||
// adding 1 for return address.
|
||||
m_context.adjustStackOffset(parametersSize + 1);
|
||||
for (ASTPointer<VariableDeclaration const> const& variable: _function.parameters())
|
||||
for (ASTPointer<VariableDeclaration> const& variable: _function.parameters())
|
||||
{
|
||||
m_context.addVariable(*variable, parametersSize);
|
||||
parametersSize -= variable->annotation().type->sizeOnStack();
|
||||
}
|
||||
|
||||
for (ASTPointer<VariableDeclaration const> const& variable: _function.returnParameters())
|
||||
for (ASTPointer<VariableDeclaration> const& variable: _function.returnParameters())
|
||||
appendStackVariableInitialisation(*variable);
|
||||
|
||||
if (_function.isConstructor())
|
||||
@ -650,7 +650,7 @@ bool ContractCompiler::visit(FunctionDefinition const& _function)
|
||||
if (stackLayout[i] != i)
|
||||
solAssert(false, "Invalid stack layout on cleanup.");
|
||||
|
||||
for (ASTPointer<VariableDeclaration const> const& variable: _function.parameters() + _function.returnParameters())
|
||||
for (ASTPointer<VariableDeclaration> const& variable: _function.parameters() + _function.returnParameters())
|
||||
m_context.removeVariable(*variable);
|
||||
|
||||
m_context.adjustStackOffset(-(int)c_returnValuesSize);
|
||||
|
Loading…
Reference in New Issue
Block a user