[clang] [CUDA][HIP] make trivial ctor/dtor host device (PR #72394)

Artem Belevich via cfe-commits cfe-commits at lists.llvm.org
Sat Nov 18 23:01:21 PST 2023


Artem-B 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() {};
```

```


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


More information about the cfe-commits mailing list