[clang-tools-extra] [clang-tidy] Add `modernize-use-uniform-initializer` check (PR #91124)

Piotr Zegar via cfe-commits cfe-commits at lists.llvm.org
Sun May 5 09:14:32 PDT 2024


================
@@ -0,0 +1,34 @@
+.. title:: clang-tidy - modernize-use-uniform-initializer
+
+modernize-use-uniform-initializer
+=================================
+
+Finds usage of C-Style initialization that can be rewritten with
+C++-11 uniform initializers.
+
+Example
+-------
+
+.. code-block:: c++
+
+  int foo = 21;
+  int bar(42);
+  
+  struct Baz {
+    Baz() : x(3) {}
+
+    int x;
+  };
----------------
PiotrZSL wrote:

add example with in-class initialization

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


More information about the cfe-commits mailing list