Treat returns with expressions as return param use

There are many cases of code where the return parameters exist mostly
as a form of documentation.  This change ensures that they do not have
to be used in the function body so long as there is a return supplying
values
This commit is contained in:
Rhett Aultman
2017-05-03 11:26:21 +02:00
committed by chriseth
parent a40c8cfb68
commit a6faa5acf3
3 changed files with 30 additions and 1 deletions
@@ -5663,6 +5663,22 @@ BOOST_AUTO_TEST_CASE(warn_unused_return_param)
}
)";
success(text);
text = R"(
contract C {
function f() returns (uint a) {
a = 1;
}
}
)";
success(text);
text = R"(
contract C {
function f() returns (uint a) {
return 1;
}
}
)";
success(text);
}
BOOST_AUTO_TEST_CASE(no_unused_warnings)