Do not warn about enabled ABIEncoderV2 anymore.

This commit is contained in:
chriseth
2019-11-26 15:49:42 +01:00
parent a45eed6dbf
commit 0973ae751a
62 changed files with 31 additions and 67 deletions
+1 -1
View File
@@ -106,7 +106,7 @@ bool SyntaxChecker::visit(PragmaDirective const& _pragma)
{
auto feature = ExperimentalFeatureNames.at(literal);
m_sourceUnit->annotation().experimentalFeatures.insert(feature);
if (!ExperimentalFeatureOnlyAnalysis.count(feature))
if (!ExperimentalFeatureWithoutWarning.count(feature))
m_errorReporter.warning(_pragma.location(), "Experimental features are turned on. Do not use experimental features on live deployments.");
}
}
+5 -3
View File
@@ -21,6 +21,7 @@
#pragma once
#include <map>
#include <set>
namespace dev
{
@@ -35,10 +36,11 @@ enum class ExperimentalFeature
TestOnlyAnalysis
};
static std::map<ExperimentalFeature, bool> const ExperimentalFeatureOnlyAnalysis =
static std::set<ExperimentalFeature> const ExperimentalFeatureWithoutWarning =
{
{ ExperimentalFeature::SMTChecker, true },
{ ExperimentalFeature::TestOnlyAnalysis, true },
ExperimentalFeature::ABIEncoderV2,
ExperimentalFeature::SMTChecker,
ExperimentalFeature::TestOnlyAnalysis,
};
static std::map<std::string, ExperimentalFeature> const ExperimentalFeatureNames =
+1 -1
View File
@@ -982,7 +982,7 @@ namespace
bool onlySafeExperimentalFeaturesActivated(set<ExperimentalFeature> const& features)
{
for (auto const feature: features)
if (!ExperimentalFeatureOnlyAnalysis.count(feature))
if (!ExperimentalFeatureWithoutWarning.count(feature))
return false;
return true;
}