aboutsummaryrefslogtreecommitdiffstats
path: root/test/libsolidity/AnalysisFramework.cpp
diff options
context:
space:
mode:
authorchriseth <chris@ethereum.org>2017-09-28 16:59:02 +0800
committerchriseth <chris@ethereum.org>2017-09-29 18:05:45 +0800
commit9d8edb46f24517dc5a0dbc0b496caad75cf39ca3 (patch)
treefc5448a20868ecb4e1dd2b84d3340f7dcf86c2f4 /test/libsolidity/AnalysisFramework.cpp
parentb92184688002c73fece4e8beb0beaa897649de4e (diff)
downloaddexon-solidity-9d8edb46f24517dc5a0dbc0b496caad75cf39ca3.tar.gz
dexon-solidity-9d8edb46f24517dc5a0dbc0b496caad75cf39ca3.tar.zst
dexon-solidity-9d8edb46f24517dc5a0dbc0b496caad75cf39ca3.zip
Allow test frameworks to filter out some warnings.
Diffstat (limited to 'test/libsolidity/AnalysisFramework.cpp')
-rw-r--r--test/libsolidity/AnalysisFramework.cpp14
1 files changed, 12 insertions, 2 deletions
diff --git a/test/libsolidity/AnalysisFramework.cpp b/test/libsolidity/AnalysisFramework.cpp
index 5f5f6411..67cc027e 100644
--- a/test/libsolidity/AnalysisFramework.cpp
+++ b/test/libsolidity/AnalysisFramework.cpp
@@ -56,8 +56,18 @@ AnalysisFramework::parseAnalyseAndReturnError(
for (auto const& currentError: m_compiler.errors())
{
solAssert(currentError->comment(), "");
- if (currentError->comment()->find("This is a pre-release compiler version") == 0)
- continue;
+ if (currentError->type() == Error::Type::Warning)
+ {
+ bool ignoreWarning = false;
+ for (auto const& filter: m_warningsToFilter)
+ if (currentError->comment()->find(filter) == 0)
+ {
+ ignoreWarning = true;
+ break;
+ }
+ if (ignoreWarning)
+ continue;
+ }
if (_reportWarnings || (currentError->type() != Error::Type::Warning))
{