[clang] [Clang][Sema] Do not attempt to instantiate a deleted move constructor (PR #80959)
via cfe-commits
cfe-commits at lists.llvm.org
Wed Feb 7 08:22:00 PST 2024
================
@@ -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;
----------------
Sirraide wrote:
> 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
That makes sense. I’ll take another look at this.
https://github.com/llvm/llvm-project/pull/80959
More information about the cfe-commits
mailing list