Only warn about variables being shadowed in inline assembly.

This commit is contained in:
chriseth
2021-02-19 14:29:22 +01:00
parent 5c6633f975
commit 78a097a012
18 changed files with 123 additions and 79 deletions
@@ -0,0 +1,8 @@
function mload() pure {}
contract C {
function g() public pure {
assembly {
}
}
}
// ----
@@ -0,0 +1,9 @@
contract C {
function add(uint, uint) public pure returns (uint) { return 7; }
function g() public pure returns (uint x, uint y) {
x = add(1, 2);
assembly {
y := add(1, 2)
}
}
}
@@ -0,0 +1,8 @@
contract C {
uint mload;
function g() public pure {
assembly {
}
}
}
// ----
@@ -9,6 +9,5 @@ contract C {
}
}
// ----
// Warning 8261: (109-119): Variable is shadowed in inline assembly by an instruction of the same name
// Warning 2072: (52-62): Unused local variable.
// Warning 2072: (109-119): Unused local variable.