================
@@ -7894,13 +7895,18 @@ bool
Sema::CheckExplicitlyDefaultedSpecialMember(CXXMethodDecl *MD,
if (ShouldDeleteForTypeMismatch || ShouldDeleteSpecialMember(MD, CSM)) {
if (First) {
SetDeclDeleted(MD, MD->getLocation());
- if (!inTemplateInstantiation() && !HadError) {
- Diag(MD->getLocation(), diag::warn_defaulted_method_deleted) << CSM;
+ if ((ForDefinition || !inTemplateInstantiation()) && !HadError) {
+ // Always error if we're about to generate a definition.
+ HadError = ForDefinition;
----------------
erichkeane wrote:
This does not seem right here... I would expect us to still want to instantiate
the function, just skip doing that earlier. I think the bisect as suggested by
others to see if we can figure out what the difference is for the cause is a
better way forward than this.
https://github.com/llvm/llvm-project/pull/80959
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits