mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Adding fixes for signedness conversion warnings in libyul
Co-authored-by: Kamil Śliwak <kamil.sliwak@codepoets.it>
This commit is contained in:
co-authored by
Kamil Śliwak
parent
21a9d3dd21
commit
33e7b24df0
@@ -51,10 +51,10 @@ void DeadCodeEliminator::operator()(Block& _block)
|
||||
tie(controlFlowChange, index) = TerminationFinder{m_dialect}.firstUnconditionalControlFlowChange(_block.statements);
|
||||
|
||||
// Erase everything after the terminating statement that is not a function definition.
|
||||
if (controlFlowChange != TerminationFinder::ControlFlow::FlowOut && index != size_t(-1))
|
||||
if (controlFlowChange != TerminationFinder::ControlFlow::FlowOut && index != std::numeric_limits<size_t>::max())
|
||||
_block.statements.erase(
|
||||
remove_if(
|
||||
_block.statements.begin() + index + 1,
|
||||
_block.statements.begin() + static_cast<ptrdiff_t>(index) + 1,
|
||||
_block.statements.end(),
|
||||
[] (Statement const& _s) { return !holds_alternative<yul::FunctionDefinition>(_s); }
|
||||
),
|
||||
@@ -63,4 +63,3 @@ void DeadCodeEliminator::operator()(Block& _block)
|
||||
|
||||
ASTModifier::operator()(_block);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user