Skip to content

Commit acffeca

Browse files
committed
Add Release Notes and comments to test
1 parent 90febd4 commit acffeca

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

clang/docs/ReleaseNotes.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -585,6 +585,8 @@ Improvements to Clang's diagnostics
585585
- For an rvalue reference bound to a temporary struct with an integer member, Clang will detect constant integer overflow
586586
in the initializer for the integer member (#GH46755).
587587

588+
- Fixed a false negative ``-Wunused-private-field`` diagnostic when a defaulted comparison operator is defined out of class (#GH116961).
589+
588590
Improvements to Clang's time-trace
589591
----------------------------------
590592

clang/test/SemaCXX/warn-unused-private-field.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,14 @@ class SpaceShipDefaultCompare {
2121
};
2222

2323
class EqDefaultCompareOutOfClass {
24-
int used;
24+
int used; // no warning
2525
bool operator==(const EqDefaultCompareOutOfClass &) const;
2626
};
2727

2828
bool EqDefaultCompareOutOfClass::operator==(const EqDefaultCompareOutOfClass &) const = default;
2929

3030
class FriendEqDefaultCompareOutOfClass {
31-
int used;
31+
int used; // no warning
3232
friend bool operator==(const FriendEqDefaultCompareOutOfClass &, const FriendEqDefaultCompareOutOfClass &);
3333
};
3434

0 commit comments

Comments
 (0)