[PATCH] D102186: [clang][c++20] Fix false warning for unused private fields when a class has only defaulted comparison operators.
Hans Wennborg via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Jun 14 01:50:55 PDT 2021
hans added inline comments.
================
Comment at: clang/test/SemaCXX/warn-unused-private-field.cpp:7
+
+class EqDefaultCompare {
+ int unused_;
----------------
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.
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