[PATCH] D103850: [clang] diagnose instead of assert for defaulted comparison return type deduction.
Matheus Izvekov via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Jun 7 17:04:22 PDT 2021
mizvekov added inline comments.
================
Comment at: clang/lib/Sema/SemaDeclCXX.cpp:7876
+ diag::
+ err_defaulted_comparison_cannot_deduce_unsupported_builtin_type)
+ << Subobj.Kind << Subobj.Decl << T;
----------------
I think this should be an error because otherwise we would be accepting and giving this program a different semantic just because of some not-implemented feature.
But I can see the downside that we could potentially reject a program which is not affected by the operator being implicitly deleted.
Thoughts?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D103850/new/
https://reviews.llvm.org/D103850
More information about the cfe-commits
mailing list