We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2a2c228 commit 4ae8651Copy full SHA for 4ae8651
clang/test/PCH/decl-attrs.cpp
@@ -12,6 +12,18 @@ namespace preferred_name {
12
Y y;
13
}
14
15
+namespace aligned {
16
+ // PR48434: ensure attributes don't introduce deserialization cycles.
17
+ template<typename T> struct X1;
18
+ using Y1 = X1<int>;
19
+ template<typename T> struct alignas(Y1*) X1 {};
20
+ Y1 y1;
21
+
22
+ template<typename T> struct X2;
23
+ using Y2 = X2<int>;
24
+ template<typename T> struct alignas(Y2*) X2 {};
25
+}
26
27
#else
28
29
namespace preferred_name {
@@ -24,4 +36,11 @@ namespace preferred_name {
36
37
38
39
40
+ extern Y1 y1;
41
+ extern Y2 y2;
42
+ static_assert(alignof(Y1) == alignof(Y1*), "");
43
+ static_assert(alignof(Y2) == alignof(Y2*), "");
44
45
46
#endif
0 commit comments