From 0dfd4a726eb7e6fa8a5e886a0d80bb5bf3d9b7dc Mon Sep 17 00:00:00 2001 From: Daniel Kirchner Date: Tue, 8 Jan 2019 19:33:46 +0100 Subject: Warn about unreachable code. --- libsolidity/analysis/ControlFlowBuilder.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'libsolidity/analysis/ControlFlowBuilder.h') diff --git a/libsolidity/analysis/ControlFlowBuilder.h b/libsolidity/analysis/ControlFlowBuilder.h index f196e5fc..b1748395 100644 --- a/libsolidity/analysis/ControlFlowBuilder.h +++ b/libsolidity/analysis/ControlFlowBuilder.h @@ -66,6 +66,11 @@ private: bool visit(VariableDeclarationStatement const& _variableDeclarationStatement) override; bool visit(Identifier const& _identifier) override; +protected: + bool visitNode(ASTNode const&) override; + +private: + /// Appends the control flow of @a _node to the current control flow. void appendControlFlow(ASTNode const& _node); @@ -77,9 +82,6 @@ private: /// Creates an arc from @a _from to @a _to. static void connect(CFGNode* _from, CFGNode* _to); - -private: - /// Splits the control flow starting at the current node into n paths. /// m_currentNode is set to nullptr and has to be set manually or /// using mergeFlow later. -- cgit v1.2.3