[clang] [clang codegen] Fix MS ABI with deleted template constructor (PR #237634)

Corentin Jabot via cfe-commits cfe-commits at lists.llvm.org
Tue Nov 3 11:56:45 PST 2026


================
@@ -1172,7 +1172,8 @@ static bool isTrivialForMSVC(const CXXRecordDecl *RD, QualType Ty,
       if (Ctor->isUserProvided())
         return false;
     } else if (auto *Template = dyn_cast<FunctionTemplateDecl>(D)) {
-      if (isa<CXXConstructorDecl>(Template->getTemplatedDecl()))
+      if (isa<CXXConstructorDecl>(Template->getTemplatedDecl()) &&
+          !Template->getTemplatedDecl()->isDeleted())
----------------
cor3ntin wrote:

yup, i think they do the dance for you of peeling off the FunctionTemplateDecl layer

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


More information about the cfe-commits mailing list