[PATCH] D151187: [doc] Add casting style preference to coding standards
Nicolai Hähnle via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue May 23 04:56:07 PDT 2023
nhaehnle added inline comments.
================
Comment at: llvm/docs/CodingStandards.rst:1269
+
+When casting, use ``static_cast`` and ``reinterpret_cast`` rather than C-style
+casts. The sole exception to this is when casting to void to suppress warnings
----------------
const_cast for completeness? And perhaps a good place to reiterate that dynamic_cast is explicitly *not* accepted, in favor of LLVM's own casting infrastructure.
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