mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
[SMTChecker] Cleanup spurious messages about TypeTypes
This commit is contained in:
@@ -560,6 +560,24 @@ bool SMTEncoder::visit(Conditional const& _op)
|
||||
return false;
|
||||
}
|
||||
|
||||
bool SMTEncoder::visit(FunctionCall const& _funCall)
|
||||
{
|
||||
auto functionCallKind = *_funCall.annotation().kind;
|
||||
if (functionCallKind != FunctionCallKind::FunctionCall)
|
||||
return true;
|
||||
|
||||
FunctionType const& funType = dynamic_cast<FunctionType const&>(*_funCall.expression().annotation().type);
|
||||
// We do not want to visit the TypeTypes in the second argument of `abi.decode`.
|
||||
// Those types are checked/used in SymbolicState::buildABIFunctions.
|
||||
if (funType.kind() == FunctionType::Kind::ABIDecode)
|
||||
{
|
||||
if (auto arg = _funCall.arguments().front())
|
||||
arg->accept(*this);
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void SMTEncoder::endVisit(FunctionCall const& _funCall)
|
||||
{
|
||||
auto functionCallKind = *_funCall.annotation().kind;
|
||||
|
||||
@@ -152,6 +152,7 @@ protected:
|
||||
bool visit(BinaryOperation const& _node) override;
|
||||
void endVisit(BinaryOperation const& _node) override;
|
||||
bool visit(Conditional const& _node) override;
|
||||
bool visit(FunctionCall const& _node) override;
|
||||
void endVisit(FunctionCall const& _node) override;
|
||||
bool visit(ModifierInvocation const& _node) override;
|
||||
void endVisit(Identifier const& _node) override;
|
||||
|
||||
Reference in New Issue
Block a user