aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity/ast/AST.h
diff options
context:
space:
mode:
authorDaniel Kirchner <daniel@ekpyron.org>2018-04-05 20:43:28 +0800
committerGitHub <noreply@github.com>2018-04-05 20:43:28 +0800
commit037eba20fc6c25777e930d97c1f53f26c6443bb0 (patch)
treeb2ea415859768ee046f5d8f93ef4741c25f1a19d /libsolidity/ast/AST.h
parent36d6c27e6826f173b491a7a536a3755609edaa29 (diff)
parent96eff0ff6abc614cb44a01137dfd0df1ef750088 (diff)
downloaddexon-solidity-037eba20fc6c25777e930d97c1f53f26c6443bb0.tar
dexon-solidity-037eba20fc6c25777e930d97c1f53f26c6443bb0.tar.gz
dexon-solidity-037eba20fc6c25777e930d97c1f53f26c6443bb0.tar.bz2
dexon-solidity-037eba20fc6c25777e930d97c1f53f26c6443bb0.tar.lz
dexon-solidity-037eba20fc6c25777e930d97c1f53f26c6443bb0.tar.xz
dexon-solidity-037eba20fc6c25777e930d97c1f53f26c6443bb0.tar.zst
dexon-solidity-037eba20fc6c25777e930d97c1f53f26c6443bb0.zip
Merge pull request #3824 from ethereum/baseArgumentsEmptyParenthesis
Error when using empty parentheses for base class constructors that r…
Diffstat (limited to 'libsolidity/ast/AST.h')
-rw-r--r--libsolidity/ast/AST.h11
1 files changed, 7 insertions, 4 deletions
diff --git a/libsolidity/ast/AST.h b/libsolidity/ast/AST.h
index 56bb412c..bc85349b 100644
--- a/libsolidity/ast/AST.h
+++ b/libsolidity/ast/AST.h
@@ -425,19 +425,22 @@ public:
InheritanceSpecifier(
SourceLocation const& _location,
ASTPointer<UserDefinedTypeName> const& _baseName,
- std::vector<ASTPointer<Expression>> _arguments
+ std::unique_ptr<std::vector<ASTPointer<Expression>>> _arguments
):
- ASTNode(_location), m_baseName(_baseName), m_arguments(_arguments) {}
+ ASTNode(_location), m_baseName(_baseName), m_arguments(std::move(_arguments)) {}
virtual void accept(ASTVisitor& _visitor) override;
virtual void accept(ASTConstVisitor& _visitor) const override;
UserDefinedTypeName const& name() const { return *m_baseName; }
- std::vector<ASTPointer<Expression>> const& arguments() const { return m_arguments; }
+ // Returns nullptr if no argument list was given (``C``).
+ // If an argument list is given (``C(...)``), the arguments are returned
+ // as a vector of expressions. Note that this vector can be empty (``C()``).
+ std::vector<ASTPointer<Expression>> const* arguments() const { return m_arguments.get(); }
private:
ASTPointer<UserDefinedTypeName> m_baseName;
- std::vector<ASTPointer<Expression>> m_arguments;
+ std::unique_ptr<std::vector<ASTPointer<Expression>>> m_arguments;
};
/**