diff options
author | chriseth <chris@ethereum.org> | 2018-02-10 00:58:50 +0800 |
---|---|---|
committer | Alex Beregszaszi <alex@rtfs.hu> | 2018-02-13 23:04:10 +0800 |
commit | 1dcd7c5e0b249511dca34dff0507b432db3bf7d1 (patch) | |
tree | 553e77484feb69103ad8fc05e6b421390872d9a9 /libsolidity/analysis/ReferencesResolver.cpp | |
parent | 5747985e6a272edd512d53b2da438577fe461bb6 (diff) | |
download | dexon-solidity-1dcd7c5e0b249511dca34dff0507b432db3bf7d1.tar.gz dexon-solidity-1dcd7c5e0b249511dca34dff0507b432db3bf7d1.tar.zst dexon-solidity-1dcd7c5e0b249511dca34dff0507b432db3bf7d1.zip |
Fix: remove reference.
Diffstat (limited to 'libsolidity/analysis/ReferencesResolver.cpp')
-rw-r--r-- | libsolidity/analysis/ReferencesResolver.cpp | 6 |
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) |