mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Allow test frameworks to filter out some warnings.
This commit is contained in:
@@ -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))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user