[clang-tools-extra] [clang-tidy] Fix bugprone-tagged-union-member-count false-positive (PR #135831)
via cfe-commits
cfe-commits at lists.llvm.org
Wed Apr 16 07:31:26 PDT 2025
================
@@ -9,6 +9,9 @@ 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
exactly one union data member and exactly one enum data member and
any number of other data members that are neither unions or enums.
+The union and enum data members that are from system header files or
+the std namespace are not considered to make up the tagged union part
----------------
EugeneZelenko wrote:
```suggestion
the ``std`` namespace are not considered to make up the tagged union part
```
https://github.com/llvm/llvm-project/pull/135831
More information about the cfe-commits
mailing list