[SMTChecker] Cleanup spurious messages about TypeTypes

This commit is contained in:
Leo Alt
2021-09-07 16:55:25 +02:00
parent 11a8505990
commit 6e2fe1e340
8 changed files with 38 additions and 21 deletions
+18
View File
@@ -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;
+1
View File
@@ -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;