[clang-tools-extra] [clang-tidy] Add readability-use-builtin-literals check (PR #76065)

Piotr Zegar via cfe-commits cfe-commits at lists.llvm.org
Fri Jan 5 03:31:45 PST 2024


================
@@ -0,0 +1,38 @@
+.. title:: clang-tidy - readability-use-builtin-literals
+
+readability-use-builtin-literals
+================================
+
+Finds literals explicitly casted to a type that could be expressed using builtin prefixes or suffixes.
+
+In elementary cases, provides automated fix-it hints.
+
+.. code-block:: c++
+
+    (char)'a';                            // -> 'a'
----------------
PiotrZSL wrote:

list here all supported types, for example in form of table, like type, example, replacement.

https://github.com/llvm/llvm-project/pull/76065


More information about the cfe-commits mailing list