Skip to content

Commit 7c3f0b2

Browse files
committed
Update release notes and improve formatting in documentation.
1 parent 61847fc commit 7c3f0b2

File tree

2 files changed

+17
-4
lines changed

2 files changed

+17
-4
lines changed

clang-tools-extra/docs/ReleaseNotes.rst

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,19 @@ Changes in existing checks
110110
<clang-tidy/checks/bugprone/signed-char-misuse>` check by fixing
111111
false positives on C23 enums with the fixed underlying type of signed char.
112112

113+
- Improved :doc:`bugprone-tagged-union-member-count
114+
<clang-tidy/checks/bugprone/tagged-union-member-count>` by fixing a false
115+
positive when typedefed enums or unions from system header files or the
116+
``std`` namespace are treated as the tag or the data part of a user-defined
117+
tagged union respectively.
118+
119+
- Improved :doc:`bugprone-unchecked-optional-access
120+
<clang-tidy/checks/bugprone/unchecked-optional-access>` fixing false
121+
positives from smart pointer accessors repeated in checking ``has_value``
122+
and accessing ``value``. The option `IgnoreSmartPointerDereference` should
123+
no longer be needed and will be removed. Also fixing false positive from
124+
const reference accessors to objects containing optional member.
125+
113126
- Improved :doc:`bugprone-unhandled-self-assignment
114127
<clang-tidy/checks/bugprone/unhandled-self-assignment>` check by adding
115128
an additional matcher that generalizes the copy-and-swap idiom pattern

clang-tools-extra/docs/clang-tidy/checks/bugprone/tagged-union-member-count.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ A struct or a class is considered to be a tagged union if it has
1010
exactly one union data member and exactly one enum data member and
1111
any number of other data members that are neither unions or enums.
1212
The union and enum data members that are from system header files or
13-
the std namespace are not considered to make up the tagged union part
13+
the ``std`` namespace are not considered to make up the tagged union part
1414
of a user-defined tagged union type.
1515

1616
Example:
@@ -32,7 +32,7 @@ Example:
3232
};
3333
3434
The following example illustrates the exception for unions and enums from
35-
system header files and the std namespace.
35+
system header files and the ``std`` namespace.
3636

3737
.. code-block:: c++
3838

@@ -43,11 +43,11 @@ system header files and the std namespace.
4343
pthread_mutex_t Mutex;
4444
};
4545

46-
The pthread_mutex_t type may be defined as a union behind a typedef,
46+
The ``pthread_mutex_t`` type may be defined as a union behind a typedef,
4747
in which case the check could mistake this type as a user-defined tagged union.
4848
After all it has exactly one enum data member and exactly one union data member.
4949
To avoid false-positive cases originating from this, unions and enums from
50-
system headers and the std namespace are ignored when pinpointing the
50+
system headers and the ``std`` namespace are ignored when pinpointing the
5151
union part and the enum part of a potential user-defined tagged union.
5252

5353
How enum constants are counted

0 commit comments

Comments
 (0)