[clang-tools-extra] [clang-tidy] Add new check bugprone-tagged-union-member-count (PR #89925)

via cfe-commits cfe-commits at lists.llvm.org
Wed Apr 24 14:51:28 PDT 2024


================
@@ -0,0 +1,66 @@
+.. title:: clang-tidy - bugprone-tagged-union-member-count
+
+bugprone-tagged-union-member-count
+==================================
+
+Gives warnings for tagged unions, where the number of tags is
+different from the number of data members inside the union.
+
+A struct or a class is considered to be a tagged union if it has
----------------
isuckatcs wrote:

The matcher only matches `struct` IIRC.

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


More information about the cfe-commits mailing list