aboutsummaryrefslogtreecommitdiffstats
path: root/test/libsolidity
diff options
context:
space:
mode:
authorRhett Aultman <roadriverrail@gmail.com>2017-05-11 22:57:34 +0800
committerRhett Aultman <roadriverrail@gmail.com>2017-05-22 06:23:05 +0800
commit621c3fa22fc5830517ad3174f7ebe2ca67f1f700 (patch)
tree38effb5a8147855bdb42174cb81443fab21d45f2 /test/libsolidity
parent1344f28fdc96276285a009df369e02555141fc27 (diff)
downloaddexon-solidity-621c3fa22fc5830517ad3174f7ebe2ca67f1f700.tar.gz
dexon-solidity-621c3fa22fc5830517ad3174f7ebe2ca67f1f700.tar.zst
dexon-solidity-621c3fa22fc5830517ad3174f7ebe2ca67f1f700.zip
Analyze InlineAssembly for variable use
The unused variable checker in StaticAnalyzer did not conssider InlineAssembly objects. This commit introduces that missing feature.
Diffstat (limited to 'test/libsolidity')
-rw-r--r--test/libsolidity/SolidityNameAndTypeResolution.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/libsolidity/SolidityNameAndTypeResolution.cpp b/test/libsolidity/SolidityNameAndTypeResolution.cpp
index 3a9f7295..97c4303f 100644
--- a/test/libsolidity/SolidityNameAndTypeResolution.cpp
+++ b/test/libsolidity/SolidityNameAndTypeResolution.cpp
@@ -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);
+}