aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity/analysis/ControlFlowAnalyzer.h
diff options
context:
space:
mode:
authorDaniel Kirchner <daniel@ekpyron.org>2019-01-09 02:33:46 +0800
committerDaniel Kirchner <daniel@ekpyron.org>2019-01-10 17:36:50 +0800
commit0dfd4a726eb7e6fa8a5e886a0d80bb5bf3d9b7dc (patch)
tree8457ac70f7e9921d9825e939f2ff23ffc1259a46 /libsolidity/analysis/ControlFlowAnalyzer.h
parent63319cfdcd7668a75caaacd0d8f3a83a62c31525 (diff)
downloaddexon-solidity-0dfd4a726eb7e6fa8a5e886a0d80bb5bf3d9b7dc.tar.gz
dexon-solidity-0dfd4a726eb7e6fa8a5e886a0d80bb5bf3d9b7dc.tar.zst
dexon-solidity-0dfd4a726eb7e6fa8a5e886a0d80bb5bf3d9b7dc.zip
Warn about unreachable code.
Diffstat (limited to 'libsolidity/analysis/ControlFlowAnalyzer.h')
-rw-r--r--libsolidity/analysis/ControlFlowAnalyzer.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/libsolidity/analysis/ControlFlowAnalyzer.h b/libsolidity/analysis/ControlFlowAnalyzer.h
index 7761817a..e1585740 100644
--- a/libsolidity/analysis/ControlFlowAnalyzer.h
+++ b/libsolidity/analysis/ControlFlowAnalyzer.h
@@ -38,6 +38,9 @@ public:
private:
/// Checks for uninitialized variable accesses in the control flow between @param _entry and @param _exit.
void checkUninitializedAccess(CFGNode const* _entry, CFGNode const* _exit) const;
+ /// Checks for unreachable code, i.e. code ending in @param _exit or @param _revert
+ /// that can not be reached from @param _entry.
+ void checkUnreachable(CFGNode const* _entry, CFGNode const* _exit, CFGNode const* _revert) const;
CFG const& m_cfg;
langutil::ErrorReporter& m_errorReporter;