[clang] [clang][Sema] deleted overriding function can have lax except spec (PR #76248)

Shafik Yaghmour via cfe-commits cfe-commits at lists.llvm.org
Thu Dec 28 14:09:22 PST 2023


================
@@ -979,6 +979,11 @@ bool Sema::CheckOverridingFunctionExceptionSpec(const CXXMethodDecl *New,
   if (isa<CXXDestructorDecl>(New) && New->getParent()->isDependentType())
     return false;
 
+  // CWG1351: if either of the old function or the new function is defined as
+  // deleted, we don't need this check.
+  if (Old->isDeleted() || New->isDeleted())
----------------
shafik wrote:

Either they both have to be deleted or not. We should diagnose otherwise. So I think checking both is redundant. 

https://github.com/llvm/llvm-project/pull/76248


More information about the cfe-commits mailing list