Skip to content

Commit

Permalink
Don't warn the user about magic variables
Browse files Browse the repository at this point in the history
  • Loading branch information
pirapira committed Jun 13, 2017
1 parent 2433c60 commit 029f9b6
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion libsolidity/analysis/NameAndTypeResolver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -240,9 +240,12 @@ void NameAndTypeResolver::warnVariablesNamedLikeInstructions()
{
string const instructionName{boost::algorithm::to_lower_copy(instruction.first)};
auto declarations = nameFromCurrentScope(instructionName);
for (Declaration const* const declaration : declarations)
for (Declaration const* const declaration: declarations)
{
solAssert(!!declaration, "");
if (dynamic_cast<MagicVariableDeclaration const* const>(declaration))
// Don't warn the user for what the user did not.
continue;
m_errorReporter.warning(
declaration->location(),
"Variable is shadowed in inline assembly by an instruction of the same name"
Expand Down

0 comments on commit 029f9b6

Please sign in to comment.