mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Treat returns with expressions as return param use
There are many cases of code where the return parameters exist mostly as a form of documentation. This change ensures that they do not have to be used in the function body so long as there is a return supplying values
This commit is contained in:
@@ -63,7 +63,7 @@ private:
|
||||
virtual bool visit(ExpressionStatement const& _statement) override;
|
||||
virtual bool visit(VariableDeclaration const& _variable) override;
|
||||
virtual bool visit(Identifier const& _identifier) override;
|
||||
|
||||
virtual bool visit(Return const& _return) override;
|
||||
virtual bool visit(MemberAccess const& _memberAccess) override;
|
||||
|
||||
ErrorList& m_errors;
|
||||
@@ -76,6 +76,7 @@ private:
|
||||
|
||||
std::map<VariableDeclaration const*, int> m_localVarUseCount;
|
||||
|
||||
const FunctionDefinition *m_currentFunction;
|
||||
bool m_inFunction = false;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user