| Issue |
170244
|
| Summary |
New __ptrauth scalar types are wrongly reported as trivially copy/move constructible
|
| Labels |
new issue
|
| Assignees |
|
| Reporter |
halbi2
|
Follows #137473 and #154394.
https://godbolt.org/z/zhsdnxKPe
```
using PA = void * __ptrauth(0,1,0);
template <class T> struct H { T t; };
static_assert(!__is_trivially_copyable(PA));
static_assert(__is_trivially_constructible(PA, PA&)); // WRONG
static_assert(__is_trivially_assignable(PA&, PA&)); // WRONG
static_assert(!__is_trivially_copyable(H<PA>));
static_assert(!__is_trivially_constructible(H<PA>, H<PA>&));
static_assert(!__is_trivially_assignable(H<PA>&, H<PA>&));
```
It cannot be that `PA` is trivially constructible and assignable by itself alone, but becomes non-trivial only when placed into a class type `H`. It also cannot be that `PA` is trivially constructible, assignable, and destructible, yet is not trivially_copyable. The conclusion is that `PA` must be non-trivial even when it is alone.
@ojhunt will you look please?
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs