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

Piotr Zegar via cfe-commits cfe-commits at lists.llvm.org
Wed Apr 24 08:40:46 PDT 2024


================
@@ -129,6 +129,12 @@ New checks
   Replaces certain conditional statements with equivalent calls to
   ``std::min`` or ``std::max``.
 
+- New :doc:`bugprone-tagged-union-member-count
+  <clang-tidy/checks/bugprone/tagged-union-member-count>` check.
+
+  Warns about suspicious looking tagged unions where the number of enum
+  constants and the number of union data members are not equal.
----------------
PiotrZSL wrote:

class documentation, release notes entry, and first sentence in documentation should be in sync.

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


More information about the cfe-commits mailing list