mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
[SMTChecker] Do not visit the name of a modifier invocation
This commit is contained in:
@@ -537,6 +537,15 @@ void SMTEncoder::endVisit(FunctionCall const& _funCall)
|
||||
}
|
||||
}
|
||||
|
||||
bool SMTEncoder::visit(ModifierInvocation const& _node)
|
||||
{
|
||||
if (auto const* args = _node.arguments())
|
||||
for (auto const& arg: *args)
|
||||
if (arg)
|
||||
arg->accept(*this);
|
||||
return false;
|
||||
}
|
||||
|
||||
void SMTEncoder::initContract(ContractDefinition const& _contract)
|
||||
{
|
||||
solAssert(m_currentContract == nullptr, "");
|
||||
@@ -605,9 +614,7 @@ void SMTEncoder::endVisit(Identifier const& _identifier)
|
||||
defineExpr(_identifier, m_context.thisAddress());
|
||||
m_uninterpretedTerms.insert(&_identifier);
|
||||
}
|
||||
else if (
|
||||
_identifier.annotation().type->category() != Type::Category::Modifier
|
||||
)
|
||||
else
|
||||
createExpr(_identifier);
|
||||
}
|
||||
|
||||
|
||||
@@ -82,6 +82,7 @@ protected:
|
||||
bool visit(BinaryOperation const& _node) override;
|
||||
void endVisit(BinaryOperation const& _node) override;
|
||||
void endVisit(FunctionCall const& _node) override;
|
||||
bool visit(ModifierInvocation const& _node) override;
|
||||
void endVisit(Identifier const& _node) override;
|
||||
void endVisit(ElementaryTypeNameExpression const& _node) override;
|
||||
void endVisit(Literal const& _node) override;
|
||||
|
||||
Reference in New Issue
Block a user