diff options
author | Rhett Aultman <roadriverrail@gmail.com> | 2017-05-11 21:26:35 +0800 |
---|---|---|
committer | Rhett Aultman <roadriverrail@gmail.com> | 2017-05-30 22:28:31 +0800 |
commit | 89b60ffbd4c2dde26fa5e9f1d750729b5c89373e (patch) | |
tree | a4c464d4d40baaa260f071c1028f347bd287e44d /libsolidity/analysis/PostTypeChecker.h | |
parent | 0066a08aa8f6c469cde7947ec50ca662a32123a0 (diff) | |
download | dexon-solidity-89b60ffbd4c2dde26fa5e9f1d750729b5c89373e.tar dexon-solidity-89b60ffbd4c2dde26fa5e9f1d750729b5c89373e.tar.gz dexon-solidity-89b60ffbd4c2dde26fa5e9f1d750729b5c89373e.tar.bz2 dexon-solidity-89b60ffbd4c2dde26fa5e9f1d750729b5c89373e.tar.lz dexon-solidity-89b60ffbd4c2dde26fa5e9f1d750729b5c89373e.tar.xz dexon-solidity-89b60ffbd4c2dde26fa5e9f1d750729b5c89373e.tar.zst dexon-solidity-89b60ffbd4c2dde26fa5e9f1d750729b5c89373e.zip |
Refactor error reporting
This commit introduces ErrorReporter, a utility class which consolidates
all of the error logging functionality into a common set of functions.
It also replaces all direct interactions with an ErrorList with calls to
an ErrorReporter.
This commit resolves issue #2209
Diffstat (limited to 'libsolidity/analysis/PostTypeChecker.h')
-rw-r--r-- | libsolidity/analysis/PostTypeChecker.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/libsolidity/analysis/PostTypeChecker.h b/libsolidity/analysis/PostTypeChecker.h index 13751c16..dbdf50e0 100644 --- a/libsolidity/analysis/PostTypeChecker.h +++ b/libsolidity/analysis/PostTypeChecker.h @@ -28,6 +28,8 @@ namespace dev namespace solidity { +class ErrorReporter; + /** * This module performs analyses on the AST that are done after type checking and assignments of types: * - whether there are circular references in constant state variables @@ -37,7 +39,7 @@ class PostTypeChecker: private ASTConstVisitor { public: /// @param _errors the reference to the list of errors and warnings to add them found during type checking. - PostTypeChecker(ErrorList& _errors): m_errors(_errors) {} + PostTypeChecker(ErrorReporter& _errorReporter): m_errorReporter(_errorReporter) {} bool check(ASTNode const& _astRoot); @@ -58,7 +60,7 @@ private: std::set<VariableDeclaration const*> const& _seen = std::set<VariableDeclaration const*>{} ); - ErrorList& m_errors; + ErrorReporter& m_errorReporter; VariableDeclaration const* m_currentConstVariable = nullptr; std::vector<VariableDeclaration const*> m_constVariables; ///< Required for determinism. |