Skip to content

Commit

Permalink
Add Release Notes and comments to test
Browse files Browse the repository at this point in the history
  • Loading branch information
Maetveis committed Nov 25, 2024
1 parent 90febd4 commit acffeca
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions clang/docs/ReleaseNotes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -585,6 +585,8 @@ Improvements to Clang's diagnostics
- For an rvalue reference bound to a temporary struct with an integer member, Clang will detect constant integer overflow
in the initializer for the integer member (#GH46755).

- Fixed a false negative ``-Wunused-private-field`` diagnostic when a defaulted comparison operator is defined out of class (#GH116961).

Improvements to Clang's time-trace
----------------------------------

Expand Down
4 changes: 2 additions & 2 deletions clang/test/SemaCXX/warn-unused-private-field.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,14 @@ class SpaceShipDefaultCompare {
};

class EqDefaultCompareOutOfClass {
int used;
int used; // no warning
bool operator==(const EqDefaultCompareOutOfClass &) const;
};

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

class FriendEqDefaultCompareOutOfClass {
int used;
int used; // no warning
friend bool operator==(const FriendEqDefaultCompareOutOfClass &, const FriendEqDefaultCompareOutOfClass &);
};

Expand Down

0 comments on commit acffeca

Please sign in to comment.