[PATCH] D151187: [doc] Add casting style preference to coding standards
Aaron Ballman via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 28 11:33:22 PDT 2023
aaron.ballman accepted this revision.
aaron.ballman added a comment.
This revision is now accepted and ready to land.
I had a few formatting nits with the changes, but the substance LGTM!
================
Comment at: llvm/docs/CodingStandards.rst:599-600
+
+* When casting to void to suppress warnings about unused variables (as an
+ alternative to `[[maybe_unused]]`). Prefer C-style casts in this instance.
+
----------------
================
Comment at: llvm/docs/CodingStandards.rst:603
+* When casting between integral types (including enums that are not strongly-
+ typed), functional-style casts are permitted as an alternative to static_cast.
+
----------------
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D151187/new/
https://reviews.llvm.org/D151187
More information about the llvm-commits
mailing list