diff options
author | Leonardo Alt <leo@ethereum.org> | 2018-12-12 19:03:59 +0800 |
---|---|---|
committer | Leonardo Alt <leo@ethereum.org> | 2018-12-12 21:43:44 +0800 |
commit | 508aae8a6709f4758753bb1e2ac1f613043c6750 (patch) | |
tree | 01039605827986d6881787bf38baa042a90b0638 /libsolidity/analysis/ViewPureChecker.cpp | |
parent | 53537864a2b7322c58248ea8c9937d13aca7ca61 (diff) | |
download | dexon-solidity-508aae8a6709f4758753bb1e2ac1f613043c6750.tar.gz dexon-solidity-508aae8a6709f4758753bb1e2ac1f613043c6750.tar.zst dexon-solidity-508aae8a6709f4758753bb1e2ac1f613043c6750.zip |
Disable state mutability warning for functions with empty body
Diffstat (limited to 'libsolidity/analysis/ViewPureChecker.cpp')
-rw-r--r-- | libsolidity/analysis/ViewPureChecker.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/libsolidity/analysis/ViewPureChecker.cpp b/libsolidity/analysis/ViewPureChecker.cpp index 1112d682..bd3071b3 100644 --- a/libsolidity/analysis/ViewPureChecker.cpp +++ b/libsolidity/analysis/ViewPureChecker.cpp @@ -156,6 +156,7 @@ void ViewPureChecker::endVisit(FunctionDefinition const& _funDef) m_bestMutabilityAndLocation.mutability < _funDef.stateMutability() && _funDef.stateMutability() != StateMutability::Payable && _funDef.isImplemented() && + !_funDef.body().statements().empty() && !_funDef.isConstructor() && !_funDef.isFallback() && !_funDef.annotation().superFunction |