[clang] [Sema] Diagnose by-value copy constructors in template instantiations (PR #130866)

via cfe-commits cfe-commits at lists.llvm.org
Thu Mar 13 00:30:36 PDT 2025


================
@@ -10921,8 +10921,8 @@ void Sema::CheckConstructor(CXXConstructorDecl *Constructor) {
   //   parameters have default arguments.
   if (!Constructor->isInvalidDecl() &&
       Constructor->hasOneParamOrDefaultArgs() &&
-      Constructor->getTemplateSpecializationKind() !=
-          TSK_ImplicitInstantiation) {
+      !Constructor->isFunctionTemplateSpecialization()
+          ) {
----------------
cor3ntin wrote:

I missed it too, sorry.

yes, feel free to submit a new pr. thanks 

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


More information about the cfe-commits mailing list