1 // RUN: %clang_cc1 -std=c23 %s -fsyntax-only --embed-dir=%S/Inputs -verify
2 // expected-no-diagnostics
11 const char data3
[] = {
12 #embed <media/art.txt> suffix(, 0)
14 const char data4
[] = {
15 #embed <media/art.txt> suffix(,)
18 static_assert(sizeof(data
) == 274);
19 static_assert(' ' == data
[0]);
20 static_assert('_' == data
[11]);
21 static_assert('\n' == data
[273]);
22 static_assert(sizeof(data2
) == 275);
23 static_assert(' ' == data2
[0]);
24 static_assert('_' == data2
[11]);
25 static_assert('\n' == data2
[273]);
26 static_assert('\0' == data2
[274]);
27 static_assert(sizeof(data3
) == 275);
28 static_assert(' ' == data3
[0]);
29 static_assert('_' == data3
[11]);
30 static_assert('\n' == data3
[273]);
31 static_assert('\0' == data3
[274]);
32 static_assert(sizeof(data4
) == 275);
33 static_assert(' ' == data4
[0]);
34 static_assert('_' == data4
[11]);
35 static_assert('\n' == data4
[273]);
36 static_assert('\0' == data4
[274]);
38 const signed char data5
[] = {
39 #embed <media/art.txt>
41 const signed char data6
[] = {
42 #embed <media/art.txt>
45 const signed char data7
[] = {
46 #embed <media/art.txt> suffix(, 0)
48 const signed char data8
[] = {
49 #embed <media/art.txt> suffix(,)
52 static_assert(sizeof(data5
) == 274);
53 static_assert(' ' == data5
[0]);
54 static_assert('_' == data5
[11]);
55 static_assert('\n' == data5
[273]);
56 static_assert(sizeof(data6
) == 275);
57 static_assert(' ' == data6
[0]);
58 static_assert('_' == data6
[11]);
59 static_assert('\n' == data6
[273]);
60 static_assert('\0' == data6
[274]);
61 static_assert(sizeof(data7
) == 275);
62 static_assert(' ' == data7
[0]);
63 static_assert('_' == data7
[11]);
64 static_assert('\n' == data7
[273]);
65 static_assert('\0' == data7
[274]);
66 static_assert(sizeof(data8
) == 275);
67 static_assert(' ' == data8
[0]);
68 static_assert('_' == data8
[11]);
69 static_assert('\n' == data8
[273]);
70 static_assert('\0' == data8
[274]);
72 const unsigned char data9
[] = {
73 #embed <media/art.txt>
75 const unsigned char data10
[] = {
77 #embed <media/art.txt>
79 const unsigned char data11
[] = {
80 #embed <media/art.txt> prefix(0,)
82 const unsigned char data12
[] = {
84 #embed <media/art.txt> prefix(,)
86 static_assert(sizeof(data9
) == 274);
87 static_assert(' ' == data9
[0]);
88 static_assert('_' == data9
[11]);
89 static_assert('\n' == data9
[273]);
90 static_assert(sizeof(data10
) == 275);
91 static_assert(' ' == data10
[1]);
92 static_assert('_' == data10
[12]);
93 static_assert('\n' == data10
[274]);
94 static_assert('\0' == data10
[0]);
95 static_assert(sizeof(data11
) == 275);
96 static_assert(' ' == data11
[1]);
97 static_assert('_' == data11
[12]);
98 static_assert('\n' == data11
[274]);
99 static_assert('\0' == data11
[0]);
100 static_assert(sizeof(data12
) == 275);
101 static_assert(' ' == data12
[1]);
102 static_assert('_' == data12
[12]);
103 static_assert('\n' == data12
[274]);
104 static_assert('\0' == data12
[0]);