mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Ignore warnings for yulOptimizer tests
This commit is contained in:
committed by
chriseth
parent
73e634924e
commit
d8263d331e
+2
-11
@@ -1,15 +1,7 @@
|
||||
contract C {
|
||||
struct S { bool f; }
|
||||
S s;
|
||||
function f(uint256 a) internal pure {
|
||||
S storage c;
|
||||
assembly {
|
||||
switch a
|
||||
default { c_slot := s_slot }
|
||||
}
|
||||
c;
|
||||
}
|
||||
function g(bool flag) internal pure {
|
||||
function f(bool flag) internal pure {
|
||||
S storage c;
|
||||
assembly {
|
||||
switch flag
|
||||
@@ -18,7 +10,7 @@ contract C {
|
||||
}
|
||||
c;
|
||||
}
|
||||
function h(uint256 a) internal pure {
|
||||
function g(uint256 a) internal pure {
|
||||
S storage c;
|
||||
assembly {
|
||||
switch a
|
||||
@@ -29,4 +21,3 @@ contract C {
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// Warning: (141-190): "switch" statement with only a default case.
|
||||
|
||||
@@ -1,20 +1,14 @@
|
||||
contract C {
|
||||
struct S { bool f; }
|
||||
S s;
|
||||
function f(uint256 a) internal pure returns (S storage c) {
|
||||
assembly {
|
||||
switch a
|
||||
default { c_slot := s_slot }
|
||||
}
|
||||
}
|
||||
function g(bool flag) internal pure returns (S storage c) {
|
||||
function f(bool flag) internal pure returns (S storage c) {
|
||||
assembly {
|
||||
switch flag
|
||||
case 0 { c_slot := s_slot }
|
||||
default { c_slot := s_slot }
|
||||
}
|
||||
}
|
||||
function h(uint256 a) internal pure returns (S storage c) {
|
||||
function g(uint256 a) internal pure returns (S storage c) {
|
||||
assembly {
|
||||
switch a
|
||||
case 0 { revert(0, 0) }
|
||||
@@ -23,4 +17,3 @@ contract C {
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// Warning: (142-191): "switch" statement with only a default case.
|
||||
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
contract C {
|
||||
struct S { bool f; }
|
||||
S s;
|
||||
function f(uint256 a) internal pure returns (S storage c) {
|
||||
assembly {
|
||||
switch a
|
||||
default { c_slot := s_slot }
|
||||
}
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// Warning: (142-195): "switch" statement with only a default case.
|
||||
Reference in New Issue
Block a user