aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity/inlineasm
diff options
context:
space:
mode:
authorAlex Beregszaszi <alex@rtfs.hu>2017-05-24 03:51:33 +0800
committerAlex Beregszaszi <alex@rtfs.hu>2017-05-26 10:20:34 +0800
commitd745dd6542d488432453035763211fdad78c3a06 (patch)
treea71a1e8c5e50a795e6fd8e6aad3b6a209f3df675 /libsolidity/inlineasm
parent0c5c1ca911de534a7fbfb8cfd6559115dd43caef (diff)
downloaddexon-solidity-d745dd6542d488432453035763211fdad78c3a06.tar.gz
dexon-solidity-d745dd6542d488432453035763211fdad78c3a06.tar.zst
dexon-solidity-d745dd6542d488432453035763211fdad78c3a06.zip
Visit case bodies in scope filler
Diffstat (limited to 'libsolidity/inlineasm')
-rw-r--r--libsolidity/inlineasm/AsmScopeFiller.cpp9
-rw-r--r--libsolidity/inlineasm/AsmScopeFiller.h2
2 files changed, 10 insertions, 1 deletions
diff --git a/libsolidity/inlineasm/AsmScopeFiller.cpp b/libsolidity/inlineasm/AsmScopeFiller.cpp
index 05b1b211..7eb6a9ed 100644
--- a/libsolidity/inlineasm/AsmScopeFiller.cpp
+++ b/libsolidity/inlineasm/AsmScopeFiller.cpp
@@ -97,6 +97,15 @@ bool ScopeFiller::operator()(assembly::FunctionDefinition const& _funDef)
return success;
}
+bool ScopeFiller::operator()(Switch const& _switch)
+{
+ bool success = true;
+ for (auto const& _case: _switch.cases)
+ if (!(*this)(_case.body))
+ success = false;
+ return success;
+}
+
bool ScopeFiller::operator()(Block const& _block)
{
bool success = true;
diff --git a/libsolidity/inlineasm/AsmScopeFiller.h b/libsolidity/inlineasm/AsmScopeFiller.h
index 0f5a5dd6..c7179b3b 100644
--- a/libsolidity/inlineasm/AsmScopeFiller.h
+++ b/libsolidity/inlineasm/AsmScopeFiller.h
@@ -70,7 +70,7 @@ public:
bool operator()(assembly::VariableDeclaration const& _variableDeclaration);
bool operator()(assembly::FunctionDefinition const& _functionDefinition);
bool operator()(assembly::FunctionCall const&) { return true; }
- bool operator()(assembly::Switch const&) { return true; };
+ bool operator()(assembly::Switch const& _switch);
bool operator()(assembly::Block const& _block);
private: