Reviewer source(s):
dfr...@chromium.org is from context(googleclient/chrome/chromium_gwsq/ui/views/config.gwsq)
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
While I am concerned about the discarding of non-discardable results in production code, I am comfortable with these changes in that they won't change any actual behavior. However, perhaps we should revisit places where `std::ignore` is now used.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Code-Review | +1 |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
While I am concerned about the discarding of non-discardable results in production code, I am comfortable with these changes in that they won't change any actual behavior. However, perhaps we should revisit places where `std::ignore` is now used.
There are hundreds of preexisting uses of `std::ignore`, and there would be even more of them if more APIs took advantage of `[[nodiscard]]`. It might be worth auditing them, and perhaps even requiring some kind of comment or annotation about *why* the value is being ignored (e.g. "side-effect only", "will be destroyed on stack", etc). I do think that could be beneficial, but would be a lot of effort.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Code-Review | +1 |
Sorry, I thought I had lg'd this already.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Remove non-adaptor uses of base::IgnoreResult
base::IgnoreResult adapts functions or callbacks; to ignore a
[[nodiscard]] value in general code should use std::ignore.
We mark base::IgnoreResult itself [[nodiscard]] with an appropriate
message to help prevent future misuse.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |