[PATCH] D151187: [doc] Add casting style preference to coding standards

Thorsten via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 23 04:46:12 PDT 2023


tschuett added a comment.

In D151187#4363856 <https://reviews.llvm.org/D151187#4363856>, @mehdi_amini wrote:

> LGTM, but you should probably get a least another one.
>
>> I agree with safety and grepable. However, I disagree with cast to void. I believe there is no final decision between cast to void and [[maybe_unused]].
>
> Are you arguing that casting to void should be forbidden right now? 
> The new documentation is not saying anything about a preference, it merely avoids introducing a new prohibition about the `(void)` pattern, which to me seems to match existing practices.

I would prefer to say nothing about cast to void. Preference for named casts is an improvement.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D151187



More information about the llvm-commits mailing list