[clang] [clang] Clang should detect illegal copy constructor with template class as its parameter (PR #81251)

via cfe-commits cfe-commits at lists.llvm.org
Thu Mar 7 06:29:39 PST 2024


cor3ntin wrote:

> I have removed this entirely, although it may still not be optimal, it did reduce few more test failures:
> 
> ```c++
> Constructor->hasOneParamOrDefaultArgs() &&
>       Constructor->getTemplateSpecializationKind() !=
>           TSK_ImplicitInstantiation
> ```
> 
> Any particular suggestions apart from updating the tests?

I think we should check `!Constructor->isFunctionTemplateSpecialization()`
See https://github.com/llvm/llvm-project/issues/80963#issuecomment-1932966220


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


More information about the cfe-commits mailing list