1 // RUN: %clang_cc1 -std=c++20 -emit-pch -o %t.a %s
2 // RUN: %clang_cc1 -std=c++20 -include-pch %t.a %s -verify
7 namespace preferred_name
{
8 template<typename T
> struct X
;
11 template<typename T
> struct [[using clang
: preferred_name(Y
), preferred_name(Z
)]] X
{};
16 // PR48434: ensure attributes don't introduce deserialization cycles.
17 template<typename T
> struct X1
;
19 template<typename T
> struct alignas(Y1
*) X1
{};
22 template<typename T
> struct X2
;
24 template<typename T
> struct alignas(Y2
*) X2
{};
29 namespace preferred_name
{
32 template<typename T
> T
forget(T t
) { return t
; }
34 forget(y
).foo(); // expected-error {{no member named 'foo' in 'preferred_name::Y'}}
35 forget(z
).foo(); // expected-error {{no member named 'foo' in 'preferred_name::Z'}}
42 static_assert(alignof(Y1
) == alignof(Y1
*), "");
43 static_assert(alignof(Y2
) == alignof(Y2
*), "");