aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorchriseth <chris@ethereum.org>2017-05-22 22:34:29 +0800
committerGitHub <noreply@github.com>2017-05-22 22:34:29 +0800
commit74d2e7311aed67e3bb6fcf1f0fa138bc3d304095 (patch)
treed5a796563e06e32baf41278f6204b39d7c845cd1 /test
parent4fd6657eefe8e07d085b65f0521a8aac25670705 (diff)
parent621c3fa22fc5830517ad3174f7ebe2ca67f1f700 (diff)
downloaddexon-solidity-74d2e7311aed67e3bb6fcf1f0fa138bc3d304095.tar.gz
dexon-solidity-74d2e7311aed67e3bb6fcf1f0fa138bc3d304095.tar.zst
dexon-solidity-74d2e7311aed67e3bb6fcf1f0fa138bc3d304095.zip
Merge pull request #2265 from roadriverrail/inline_asm_unused_warning
Analyze InlineAssembly for variable use
Diffstat (limited to 'test')
-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);
+}