aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity/analysis
diff options
context:
space:
mode:
authorchriseth <chris@ethereum.org>2018-02-10 00:58:50 +0800
committerAlex Beregszaszi <alex@rtfs.hu>2018-02-13 23:04:10 +0800
commit1dcd7c5e0b249511dca34dff0507b432db3bf7d1 (patch)
tree553e77484feb69103ad8fc05e6b421390872d9a9 /libsolidity/analysis
parent5747985e6a272edd512d53b2da438577fe461bb6 (diff)
downloaddexon-solidity-1dcd7c5e0b249511dca34dff0507b432db3bf7d1.tar.gz
dexon-solidity-1dcd7c5e0b249511dca34dff0507b432db3bf7d1.tar.zst
dexon-solidity-1dcd7c5e0b249511dca34dff0507b432db3bf7d1.zip
Fix: remove reference.
Diffstat (limited to 'libsolidity/analysis')
-rw-r--r--libsolidity/analysis/ReferencesResolver.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/libsolidity/analysis/ReferencesResolver.cpp b/libsolidity/analysis/ReferencesResolver.cpp
index 1b0e8179..0bb5e3fe 100644
--- a/libsolidity/analysis/ReferencesResolver.cpp
+++ b/libsolidity/analysis/ReferencesResolver.cpp
@@ -48,8 +48,10 @@ bool ReferencesResolver::visit(Identifier const& _identifier)
auto declarations = m_resolver.nameFromCurrentScope(_identifier.name());
if (declarations.empty())
{
- string const& suggestions = m_resolver.similarNameSuggestions(_identifier.name());
- string errorMessage = "Undeclared identifier." + (suggestions.empty()? "": " Did you mean " + suggestions + "?");
+ string suggestions = m_resolver.similarNameSuggestions(_identifier.name());
+ string errorMessage =
+ "Undeclared identifier." +
+ (suggestions.empty()? "": " Did you mean " + std::move(suggestions) + "?");
declarationError(_identifier.location(), errorMessage);
}
else if (declarations.size() == 1)