aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity/ast/AST.h
diff options
context:
space:
mode:
authorchriseth <chris@ethereum.org>2017-09-15 00:44:03 +0800
committerGitHub <noreply@github.com>2017-09-15 00:44:03 +0800
commit934b0d2f0daf0a45fb686ec5073dbd288d27f769 (patch)
tree8f18501d9ecbc97af0fc86df0cb2dd7027144ad8 /libsolidity/ast/AST.h
parent1c85ba10e13879f680579031234c911099433596 (diff)
parent67f96652f5701b581efcda8585ab5e765aa68344 (diff)
downloaddexon-solidity-934b0d2f0daf0a45fb686ec5073dbd288d27f769.tar.gz
dexon-solidity-934b0d2f0daf0a45fb686ec5073dbd288d27f769.tar.zst
dexon-solidity-934b0d2f0daf0a45fb686ec5073dbd288d27f769.zip
Merge pull request #2749 from ethereum/require-visibility
Warn if no visibility is specified on contract functions.
Diffstat (limited to 'libsolidity/ast/AST.h')
-rw-r--r--libsolidity/ast/AST.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/libsolidity/ast/AST.h b/libsolidity/ast/AST.h
index cecc2f04..75b8e946 100644
--- a/libsolidity/ast/AST.h
+++ b/libsolidity/ast/AST.h
@@ -180,6 +180,7 @@ public:
/// @returns the declared name.
ASTString const& name() const { return *m_name; }
+ bool noVisibilitySpecified() const { return m_visibility == Visibility::Default; }
Visibility visibility() const { return m_visibility == Visibility::Default ? defaultVisibility() : m_visibility; }
bool isPublic() const { return visibility() >= Visibility::Public; }
virtual bool isVisibleInContract() const { return visibility() != Visibility::External; }