Fixes bug 50263
When "unused-private-field" flag is on if you have a struct with private members and only defaulted comparison operators clang will warn about unused private fields.
If you where to write the comparison operators by hand no warning is produced.
This is a bug since defaulting a comparison operator uses all private members .
The fix is simple, in CheckExplicitlyDefaultedFunction just clear the list of unused private fields if the defaulted function is a comparison function.
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.