[clang-tools-extra] [clang-tidy] The first PR our of many PRs for the "Initialized Class Members" check. (PR #65189)

Carlos Galvez via cfe-commits cfe-commits at lists.llvm.org
Fri Sep 8 12:43:03 PDT 2023


================
@@ -0,0 +1,34 @@
+.. title:: clang-tidy - google-cpp-init-class-members
+
+google-cpp-init-class-members
+=============================
+
+Checks that class members are initialized in constructors (implicitly or
+explicitly). Reports constructors or classes where class members are not
+initialized. The goal of this check is to eliminate UUM (Use of
+Uninitialized Memory) bugs caused by uninitialized class members.
+
+This check is under active development: the check authors made a few commits
+and are actively working on more commits. Users who want a mature and stable
+check should not use this check yet.
+
+This check is different from ProTypeMemberInitCheck in that this check
+attempts to eliminate UUMs as a bug class, at the expense of false
+positives. The authors of this check will add more documentation about the
+differences with ProTypeMemberInitCheck as the check evolves.
+
+For now, this check reports `X` in the following two patterns:
----------------
carlosgalvezp wrote:

It would be good to show what the "fixed" code would look like.

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


More information about the cfe-commits mailing list