[PATCH] D102186: [clang][c++20] Fix false warning for unused private fields when a class has only defaulted comparison operators.

Alexandru Octavian Buțiu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jun 16 05:12:44 PDT 2021


predator5047 marked an inline comment as done.
predator5047 added inline comments.


================
Comment at: clang/test/SemaCXX/warn-unused-private-field.cpp:7
+
+class EqDefaultCompare {
+  int unused_;
----------------
hans wrote:
> The test case feels a little strange to me, I mean the member variable is still pretty unused even though I suppose the comparison function technically uses it.. At least the test case in the bug report had a constructor which set the value. Perhaps with that it makes more sense.
Thanks for your feedback I updated the test case based on your comments.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D102186/new/

https://reviews.llvm.org/D102186



More information about the cfe-commits mailing list