mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
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:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user