[clang] [Clang] Ensure "=default"ed function can be deleted when used as an extension in C++03 (PR #90725)

Mital Ashok via cfe-commits cfe-commits at lists.llvm.org
Wed May 1 08:13:03 PDT 2024


================
@@ -9767,7 +9767,9 @@ bool Sema::ShouldDeleteSpecialMember(CXXMethodDecl *MD,
     return false;
   CXXRecordDecl *RD = MD->getParent();
   assert(!RD->isDependentType() && "do deletion after instantiation");
-  if (!LangOpts.CPlusPlus || (!LangOpts.CPlusPlus11 && !RD->isLambda()) ||
+  if (!LangOpts.CPlusPlus ||
----------------
MitalAshok wrote:

I wouldn't think so since we have a CXXMethodDecl and CXXRecordDecl. It was added with #73376 which changed it from`!CPlusPlus11` when adding C++03 lambdas

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


More information about the cfe-commits mailing list