[PATCH] D120140: [clang-format] Avoid inserting space after C++ casts.

Zhihao Yuan via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Feb 18 10:53:00 PST 2022


lichray added inline comments.


================
Comment at: clang/lib/Format/TokenAnnotator.cpp:1951
+            // FIXME: Maybe we should handle identifiers ending with "_cast",
+            // e.g. bit_cast?
+            return true;
----------------
Very unlikely `bit_cast` gives you something callable; `any_cast` may. I think keywords are ok for now, and cheap. Others may need a different strategy.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D120140



More information about the cfe-commits mailing list