================
@@ -20,6 +20,17 @@ class SpaceShipDefaultCompare {
   int operator<=>(const SpaceShipDefaultCompare &) const = default;
 };
 
+class UnusedConstPrivateField {
+ public:
+  UnusedConstPrivateField() : unused_(0) {}
+ private:
+  const int unused_; // expected-warning{{private field 'unused_' is not used}}
+};
+
+class FriendEqDefaultCompare {
+  friend auto operator==(FriendEqDefaultCompare, FriendEqDefaultCompare) -> 
bool = default;
----------------
Maetveis wrote:

Can you add a test case with a non-friend (normal method) on the unrelated 
class too?
Also it would be nice to extend the original test (the positive one) with a 
case where the comparison is defined as a friend function.

https://github.com/llvm/llvm-project/pull/116871
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to