File tree Expand file tree Collapse file tree 2 files changed +14
-7
lines changed Expand file tree Collapse file tree 2 files changed +14
-7
lines changed Original file line number Diff line number Diff line change @@ -641,6 +641,20 @@ Improvements to Clang's diagnostics
641641
642642- Clang now diagnoses dangling references for C++20's parenthesized aggregate initialization (#101957).
643643
644+ - Fixed a bug where Clang would not emit ``-Wunused-private-field `` warnings when an unrelated class
645+ defined a defaulted comparison operator (#GH116270).
646+
647+ .. code-block :: c++
648+
649+ class A {
650+ private:
651+ int a; // warning: private field 'a' is not used, no diagnostic previously
652+ };
653+
654+ class C {
655+ bool operator==(const C&) = default;
656+ };
657+
644658Improvements to Clang's time-trace
645659----------------------------------
646660
Original file line number Diff line number Diff line change @@ -40,13 +40,6 @@ class FriendEqDefaultCompareOutOfClass {
4040
4141bool operator ==(const FriendEqDefaultCompareOutOfClass &, const FriendEqDefaultCompareOutOfClass &) = default ;
4242
43- class UnusedConstPrivateField {
44- public:
45- UnusedConstPrivateField () : unused_(0 ) {}
46- private:
47- const int unused_; // expected-warning{{private field 'unused_' is not used}}
48- };
49-
5043class HasUnusedField {
5144 int unused_; // expected-warning{{private field 'unused_' is not used}}
5245};
You can’t perform that action at this time.
0 commit comments