mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Merge pull request #11484 from ethereum/fix-unreachable-code-anaysis
Fix revert pruner modifying function flows wrong
This commit is contained in:
@@ -10,3 +10,4 @@ contract C {
|
||||
// ====
|
||||
// SMTEngine: all
|
||||
// ----
|
||||
// Warning 5740: (122-136): Unreachable code.
|
||||
|
||||
+1
@@ -5,3 +5,4 @@ contract C {
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// Warning 5740: (78-79): Unreachable code.
|
||||
|
||||
+1
@@ -10,4 +10,5 @@ contract C {
|
||||
function h() internal pure returns (bytes memory, string storage s) { s = s; }
|
||||
}
|
||||
// ----
|
||||
// Warning 5740: (111-115): Unreachable code.
|
||||
// Warning 6321: (250-262): Unnamed return variable can remain unassigned. Add an explicit return with value to all non-reverting code paths or name the variable.
|
||||
|
||||
@@ -3,4 +3,5 @@ contract test {
|
||||
function f(uint256) public returns (uint out) { f(variable); test; out; }
|
||||
}
|
||||
// ----
|
||||
// Warning 5740: (103-112): Unreachable code.
|
||||
// Warning 6133: (103-107): Statement has no effect.
|
||||
|
||||
@@ -5,3 +5,9 @@ contract C {
|
||||
function i() payable public { i(); h(); g(); f(); }
|
||||
}
|
||||
// ----
|
||||
// Warning 5740: (102-105): Unreachable code.
|
||||
// Warning 5740: (140-143): Unreachable code.
|
||||
// Warning 5740: (145-148): Unreachable code.
|
||||
// Warning 5740: (191-194): Unreachable code.
|
||||
// Warning 5740: (196-199): Unreachable code.
|
||||
// Warning 5740: (201-204): Unreachable code.
|
||||
|
||||
@@ -7,3 +7,4 @@ contract C {
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// Warning 5740: (142-237): Unreachable code.
|
||||
|
||||
Reference in New Issue
Block a user