From 621c3fa22fc5830517ad3174f7ebe2ca67f1f700 Mon Sep 17 00:00:00 2001 From: Rhett Aultman Date: Thu, 11 May 2017 07:57:34 -0700 Subject: Analyze InlineAssembly for variable use The unused variable checker in StaticAnalyzer did not conssider InlineAssembly objects. This commit introduces that missing feature. --- test/libsolidity/SolidityNameAndTypeResolution.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'test') 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); +} -- cgit v1.2.3