aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity/NameAndTypeResolver.cpp
diff options
context:
space:
mode:
authorLianaHus <liana@ethdev.com>2015-10-15 22:08:02 +0800
committerLianaHus <liana@ethdev.com>2015-10-15 22:08:02 +0800
commit68e126dc7d85854aa1458934122a725e99eb36e0 (patch)
tree72e84f78ad5ef7d3617bb0860468c648b469eba7 /libsolidity/NameAndTypeResolver.cpp
parentcd6262998ccf3c712bb2af1981eeb943ccaf8094 (diff)
downloaddexon-solidity-68e126dc7d85854aa1458934122a725e99eb36e0.tar.gz
dexon-solidity-68e126dc7d85854aa1458934122a725e99eb36e0.tar.zst
dexon-solidity-68e126dc7d85854aa1458934122a725e99eb36e0.zip
style fixes mostly
Diffstat (limited to 'libsolidity/NameAndTypeResolver.cpp')
-rw-r--r--libsolidity/NameAndTypeResolver.cpp45
1 files changed, 30 insertions, 15 deletions
diff --git a/libsolidity/NameAndTypeResolver.cpp b/libsolidity/NameAndTypeResolver.cpp
index dc82531f..fc83403f 100644
--- a/libsolidity/NameAndTypeResolver.cpp
+++ b/libsolidity/NameAndTypeResolver.cpp
@@ -296,17 +296,25 @@ vector<_T const*> NameAndTypeResolver::cThreeMerge(list<list<_T const*>>& _toMer
void NameAndTypeResolver::reportDeclarationError(
SourceLocation _sourceLoction,
string const& _description,
- SourceLocation _secondarySourceLocation = SourceLocation(),
- string const& _secondaryDescription = ""
+ SourceLocation _secondarySourceLocation,
+ string const& _secondaryDescription
)
{
auto err = make_shared<Error>(Error::Type::DeclarationError); // todo remove Error?
*err <<
- errinfo_sourceLocation(_sourceLoction) <<
- errinfo_comment(_description) <<
- errinfo_secondarySourceLocation(
- SecondarySourceLocation().append(_secondaryDescription, _secondarySourceLocation)
- );
+ errinfo_sourceLocation(_sourceLoction) <<
+ errinfo_comment(_description) <<
+ errinfo_secondarySourceLocation(
+ SecondarySourceLocation().append(_secondaryDescription, _secondarySourceLocation)
+ );
+
+ m_errors.push_back(err);
+}
+
+void NameAndTypeResolver::reportDeclarationError(SourceLocation _sourceLoction, string const& _description)
+{
+ auto err = make_shared<Error>(Error::Type::DeclarationError); // todo remove Error?
+ *err << errinfo_sourceLocation(_sourceLoction) << errinfo_comment(_description);
m_errors.push_back(err);
}
@@ -331,7 +339,6 @@ void NameAndTypeResolver::reportFatalTypeError(Error _e)
BOOST_THROW_EXCEPTION(FatalError());
}
-
DeclarationRegistrationHelper::DeclarationRegistrationHelper(
map<ASTNode const*, DeclarationContainer>& _scopes,
ASTNode& _astRoot,
@@ -506,17 +513,25 @@ string DeclarationRegistrationHelper::currentCanonicalName() const
void DeclarationRegistrationHelper::declarationError(
SourceLocation _sourceLoction,
string const& _description,
- SourceLocation _secondarySourceLocation = SourceLocation(),
- string const& _secondaryDescription = ""
+ SourceLocation _secondarySourceLocation,
+ string const& _secondaryDescription
)
{
auto err = make_shared<Error>(Error::Type::DeclarationError);
*err <<
- errinfo_sourceLocation(_sourceLoction) <<
- errinfo_comment(_description) <<
- errinfo_secondarySourceLocation(
- SecondarySourceLocation().append(_secondaryDescription, _secondarySourceLocation)
- );
+ errinfo_sourceLocation(_sourceLoction) <<
+ errinfo_comment(_description) <<
+ errinfo_secondarySourceLocation(
+ SecondarySourceLocation().append(_secondaryDescription, _secondarySourceLocation)
+ );
+
+ m_errors.push_back(err);
+}
+
+void DeclarationRegistrationHelper::declarationError(SourceLocation _sourceLoction, string const& _description)
+{
+ auto err = make_shared<Error>(Error::Type::DeclarationError);
+ *err << errinfo_sourceLocation(_sourceLoction) << errinfo_comment(_description);
m_errors.push_back(err);
}