================ @@ -7535,7 +7535,7 @@ void Sema::CheckExplicitlyDefaultedFunction(Scope *S, FunctionDecl *FD) { return; } - if (DefKind.isComparison()) + if (DefKind.isComparison() && isa<CXXRecordDecl>(FD->getDeclContext())) UnusedPrivateFields.clear(); ---------------- whiteio wrote:
Thanks for the pointers! I believe I understand now. I've push a new commit with the changes 1f64a2bb972f5cf9e6455eb721acfd8281ad6981 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