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

Shafik Yaghmour via cfe-commits cfe-commits at lists.llvm.org
Wed Mar 12 22:12:19 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()
+          ) {
----------------
shafik wrote:

Did you run clang-format on this? I am surprised it would leave the `)` on the line like that but maybe I am off.

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


More information about the cfe-commits mailing list