Analyze InlineAssembly for variable use

The unused variable checker in StaticAnalyzer did not conssider
InlineAssembly objects.  This commit introduces that missing feature.
This commit is contained in:
Rhett Aultman
2017-05-21 15:23:05 -07:00
parent 1344f28fdc
commit 621c3fa22f
4 changed files with 41 additions and 2 deletions
@@ -5718,6 +5718,20 @@ BOOST_AUTO_TEST_CASE(no_unused_dec_after_use)
CHECK_SUCCESS_NO_WARNINGS(text);
}
BOOST_AUTO_TEST_CASE(no_unused_inline_asm)
{
char const* text = R"(
contract C {
function f() {
uint a;
assembly {
a := 1
}
}
}
)";
CHECK_SUCCESS_NO_WARNINGS(text);
}