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

Sergei Barannikov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 23 03:40:15 PDT 2023


barannikov88 added a comment.

What about function style casts? I personally find them acceptable in limited cases, such as "constructing" int64_t from unsigned.



================
Comment at: llvm/docs/CodingStandards.rst:1275
+  int x = 42;
+  long *y = static_cast<long *>(&x);
+  (void)y;
----------------
This does not compile.



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