aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity
diff options
context:
space:
mode:
Diffstat (limited to 'libsolidity')
-rw-r--r--libsolidity/analysis/ControlFlowGraph.h3
-rw-r--r--libsolidity/ast/ASTAnnotations.h4
-rw-r--r--libsolidity/ast/Types.h1
-rw-r--r--libsolidity/codegen/LValue.h2
-rw-r--r--libsolidity/parsing/Parser.cpp2
-rw-r--r--libsolidity/parsing/Parser.h7
6 files changed, 11 insertions, 8 deletions
diff --git a/libsolidity/analysis/ControlFlowGraph.h b/libsolidity/analysis/ControlFlowGraph.h
index db8e1565..cc0113d8 100644
--- a/libsolidity/analysis/ControlFlowGraph.h
+++ b/libsolidity/analysis/ControlFlowGraph.h
@@ -103,7 +103,8 @@ struct CFGNode
/** Describes the control flow of a function. */
struct FunctionFlow
{
- virtual ~FunctionFlow() {}
+ virtual ~FunctionFlow() = default;
+
/// Entry node. Control flow of the function starts here.
/// This node is empty and does not have any entries.
CFGNode* entry = nullptr;
diff --git a/libsolidity/ast/ASTAnnotations.h b/libsolidity/ast/ASTAnnotations.h
index 33893a4f..d1acf90b 100644
--- a/libsolidity/ast/ASTAnnotations.h
+++ b/libsolidity/ast/ASTAnnotations.h
@@ -46,7 +46,7 @@ using TypePointer = std::shared_ptr<Type const>;
struct ASTAnnotation
{
- virtual ~ASTAnnotation() {}
+ virtual ~ASTAnnotation() = default;
};
struct DocTag
@@ -57,7 +57,7 @@ struct DocTag
struct DocumentedAnnotation
{
- virtual ~DocumentedAnnotation() {}
+ virtual ~DocumentedAnnotation() = default;
/// Mapping docstring tag name -> content.
std::multimap<std::string, DocTag> docTags;
};
diff --git a/libsolidity/ast/Types.h b/libsolidity/ast/Types.h
index ac1487b2..bee00661 100644
--- a/libsolidity/ast/Types.h
+++ b/libsolidity/ast/Types.h
@@ -601,7 +601,6 @@ private:
class BoolType: public Type
{
public:
- BoolType() {}
Category category() const override { return Category::Bool; }
std::string richIdentifier() const override { return "t_bool"; }
TypeResult unaryOperatorResult(Token _operator) const override;
diff --git a/libsolidity/codegen/LValue.h b/libsolidity/codegen/LValue.h
index 3b44597f..3072ff11 100644
--- a/libsolidity/codegen/LValue.h
+++ b/libsolidity/codegen/LValue.h
@@ -49,7 +49,7 @@ protected:
m_context(_compilerContext), m_dataType(_dataType) {}
public:
- virtual ~LValue() {}
+ virtual ~LValue() = default;
/// @returns the number of stack slots occupied by the lvalue reference
virtual unsigned sizeOnStack() const { return 1; }
/// Copies the value of the current lvalue to the top of the stack and, if @a _remove is true,
diff --git a/libsolidity/parsing/Parser.cpp b/libsolidity/parsing/Parser.cpp
index 5b9c309a..8a6bc343 100644
--- a/libsolidity/parsing/Parser.cpp
+++ b/libsolidity/parsing/Parser.cpp
@@ -48,7 +48,7 @@ public:
explicit ASTNodeFactory(Parser const& _parser):
m_parser(_parser), m_location{_parser.position(), -1, _parser.source()} {}
ASTNodeFactory(Parser const& _parser, ASTPointer<ASTNode> const& _childNode):
- m_parser(_parser), m_location(_childNode->location()) {}
+ m_parser(_parser), m_location{_childNode->location()} {}
void markEndPosition() { m_location.end = m_parser.endPosition(); }
void setLocation(SourceLocation const& _location) { m_location = _location; }
diff --git a/libsolidity/parsing/Parser.h b/libsolidity/parsing/Parser.h
index bf02c626..b8d0e9a8 100644
--- a/libsolidity/parsing/Parser.h
+++ b/libsolidity/parsing/Parser.h
@@ -47,7 +47,10 @@ private:
struct VarDeclParserOptions
{
+ // This is actually not needed, but due to a defect in the C++ standard, we have to.
+ // https://stackoverflow.com/questions/17430377
VarDeclParserOptions() {}
+
bool allowVar = false;
bool isStateVariable = false;
bool allowIndexed = false;
@@ -85,7 +88,7 @@ private:
ASTPointer<EnumDefinition> parseEnumDefinition();
ASTPointer<EnumValue> parseEnumValue();
ASTPointer<VariableDeclaration> parseVariableDeclaration(
- VarDeclParserOptions const& _options = VarDeclParserOptions(),
+ VarDeclParserOptions const& _options = {},
ASTPointer<TypeName> const& _lookAheadArrayType = ASTPointer<TypeName>()
);
ASTPointer<ModifierDefinition> parseModifierDefinition();
@@ -99,7 +102,7 @@ private:
ASTPointer<FunctionTypeName> parseFunctionType();
ASTPointer<Mapping> parseMapping();
ASTPointer<ParameterList> parseParameterList(
- VarDeclParserOptions const& _options,
+ VarDeclParserOptions const& _options = {},
bool _allowEmpty = true
);
ASTPointer<Block> parseBlock(ASTPointer<ASTString> const& _docString = {});