diff options
Diffstat (limited to 'libsolidity')
-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) |