[clang] [CUDA][HIP] make trivial ctor/dtor host device (PR #72394)
Yaxun Liu via cfe-commits
cfe-commits at lists.llvm.org
Sun Nov 19 16:39:50 PST 2023
yxsamliu wrote:
> > We've found a problem with the patch. https://godbolt.org/z/jcKo34vzG
> > ```
> > template <typename T>
> > class C {
> > explicit C() {};
> > };
> >
> > template <> C<int>::C() {};
> > ```
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > ```
> > <source>:6:21: error: __host__ function 'C' cannot overload __host__ __device__ function 'C'
> > 6 | template <> C<int>::C() {};
> > | ^
> > <source>:3:14: note: previous declaration is here
> > 3 | explicit C() {};
> > ```
>
fix by https://github.com/llvm/llvm-project/pull/72815
https://github.com/llvm/llvm-project/pull/72394
More information about the cfe-commits
mailing list