Warn about unreachable code.

This commit is contained in:
Daniel Kirchner
2019-01-10 10:36:50 +01:00
parent 63319cfdcd
commit 0dfd4a726e
27 changed files with 258 additions and 12 deletions
+5 -3
View File
@@ -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.