[PATCH] D96082: [clang-tidy] Add 'readability-useless-return-value' check

Stephen Kelly via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sat Feb 13 09:06:28 PST 2021


steveire added a comment.

In D96082#2550468 <https://reviews.llvm.org/D96082#2550468>, @LukasHanel wrote:

> In D96082#2549943 <https://reviews.llvm.org/D96082#2549943>, @steveire wrote:
>
>> In D96082#2545807 <https://reviews.llvm.org/D96082#2545807>, @LukasHanel wrote:
>>
>>> Hi, thanks for discussing my proposal!
>>>
>>> - Usefulness of the fix-it's
>>
>> I agree with @njames93 that this check is dangerous. Even if you extended it to port callExprs, that would only work in translation units which can see the definition.
>
> Are you saying I should just remove the fix-its altogether?
> Or, put them under some option that is off by default?

I'm not sure this check meets the general applicability and usefulness threshold to be part of clang-tidy. The warning alone isn't actionable. Someone wanting to take action on the warning would have to write their own clang tidy check to make the change across their codebase. Add that to the false-positive issues I mentioned before.

Does anyone have any other thoughts?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D96082/new/

https://reviews.llvm.org/D96082



More information about the cfe-commits mailing list