You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: tools/clang/test/HLSL/conversions-non-numeric-aggregates.hlsl
+6-6Lines changed: 6 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -7,13 +7,13 @@ struct ObjStruct { Buffer a; };
7
7
8
8
voidmain()
9
9
{
10
-
(Buffer[1])0; /* expected-error {{cannot convert from 'literal int' to 'Buffer [1]'}} */
11
-
(ObjStruct)0; /* expected-error {{cannot convert from 'literal int' to 'ObjStruct'}} */
12
-
(Buffer[1])(int[1])0; /* expected-error {{cannot convert from 'int [1]' to 'Buffer [1]'}} */
13
-
(ObjStruct)(NumStruct)0; /* expected-error {{cannot convert from 'NumStruct' to 'ObjStruct'}} */
10
+
(Buffer[1])0; /* expected-error {{cannot convert from 'literal int' to 'Buffer [1]'}} fxc-error {{X3017: cannot convert from 'int' to 'Buffer<float4>[1]'}} */
11
+
(ObjStruct)0; /* expected-error {{cannot convert from 'literal int' to 'ObjStruct'}} fxc-error {{X3017: cannot convert from 'int' to 'struct ObjStruct'}} */
12
+
(Buffer[1])(int[1])0; /* expected-error {{cannot convert from 'int [1]' to 'Buffer [1]'}} fxc-error {{X3017: cannot convert from 'const int[1]' to 'Buffer<float4>[1]'}} */
13
+
(ObjStruct)(NumStruct)0; /* expected-error {{cannot convert from 'NumStruct' to 'ObjStruct'}} fxc-error {{X3017: cannot convert from 'const struct NumStruct' to 'struct ObjStruct'}} */
14
14
15
15
Buffer oa1[1];
16
16
ObjStruct os1;
17
-
(int)oa1; /* expected-error {{cannot convert from 'Buffer [1]' to 'int'}} */
18
-
(int)os1; /* expected-error {{cannot convert from 'ObjStruct' to 'int'}} */
17
+
(int)oa1; /* expected-error {{cannot convert from 'Buffer [1]' to 'int'}} fxc-error {{X3017: cannot convert from 'Buffer<float4>[1]' to 'int'}} */
18
+
(int)os1; /* expected-error {{cannot convert from 'ObjStruct' to 'int'}} fxc-error {{X3017: cannot convert from 'struct ObjStruct' to 'int'}} */
inta a; // expected-error {{array dimensions of struct/class members must be explicit}}
13
+
inta a; // expected-error {{array dimensions of struct/class members must be explicit}} fxc-error {{X3000: unrecognized identifier 'inta'}}
14
14
};
15
15
16
16
struct foo2 {
17
-
int a[]; // expected-error {{array dimensions of struct/class members must be explicit}}
17
+
int a[]; // expected-error {{array dimensions of struct/class members must be explicit}} fxc-error {{X3072: 'foo2::a': array dimensions of struct/class members must be explicit}}
18
18
float4 member;
19
19
};
20
20
21
21
class foo3 {
22
22
float4 member;
23
-
inta a; // expected-error {{array dimensions of struct/class members must be explicit}}
23
+
inta a; // expected-error {{array dimensions of struct/class members must be explicit}} fxc-error {{X3000: unrecognized identifier 'inta'}}
24
24
};
25
25
26
26
class foo4 {
27
27
float4 member;
28
-
int a[]; // expected-error {{array dimensions of struct/class members must be explicit}}
29
-
};
28
+
int a[]; // expected-error {{array dimensions of struct/class members must be explicit}} fxc-error {{X3072: 'foo4::a': array dimensions of struct/class members must be explicit}}
0 commit comments