Skip to content

Commit c8de4c3

Browse files
authored
[Test] Remove use of -verify-ignore-unexpected. (microsoft#5902)
Just add the missing expected-note. This is for microsoft#5870
1 parent ffd4fee commit c8de4c3

9 files changed

+189
-15
lines changed
Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
1-
// RUN: %clang_cc1 -Wno-unused-value -fsyntax-only -ffreestanding -HV 2016 -verify -verify-ignore-unexpected=note %s
1+
// RUN: %clang_cc1 -Wno-unused-value -fsyntax-only -ffreestanding -HV 2016 -verify %s
22

33
void dead()
44
{
5+
// expected-note@+2 {{array 'array' declared here}}
6+
// expected-note@+1 {{array 'array' declared here}}
57
int array[2];
68
array[-1] = 0; /* expected-warning {{array index -1 is before the beginning of the array}} fxc-pass {{}} */
79
array[0] = 0;
810
array[1] = 0;
911
array[2] = 0; /* expected-warning {{array index 2 is past the end of the array (which contains 2 elements)}} fxc-pass {{}} */
1012
}
1113

12-
void main() {}
14+
void main() {}
Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
1-
// RUN: %clang_cc1 -Wno-unused-value -fsyntax-only -ffreestanding -verify -verify-ignore-unexpected=note %s
1+
// RUN: %clang_cc1 -Wno-unused-value -fsyntax-only -ffreestanding -verify %s
22

33
void main()
44
{
5+
// expected-note@+2 {{array 'array' declared here}}
6+
// expected-note@+1 {{array 'array' declared here}}
57
int array[2];
68
array[-1] = 0; /* expected-error {{array index -1 is out of bounds}} fxc-error {{X3504: array index out of bounds}} */
79
array[0] = 0;
810
array[1] = 0;
911
array[2] = 0; /* expected-error {{array index 2 is out of bounds}} fxc-error {{X3504: array index out of bounds}} */
10-
}
12+
}

tools/clang/test/HLSL/builtin-types-no-inheritance.hlsl

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,18 @@
1-
// RUN: %clang_cc1 -Wno-unused-value -fsyntax-only -ffreestanding -verify -verify-ignore-unexpected=note %s
1+
// RUN: %clang_cc1 -Wno-unused-value -fsyntax-only -ffreestanding -verify %s
2+
3+
// expected-note@? {{'vector' declared here}}
4+
// expected-note@? {{'matrix' declared here}}
5+
// expected-note@? {{'Texture3D' declared here}}
6+
// expected-note@? {{'ByteAddressBuffer' declared here}}
7+
// expected-note@? {{'StructuredBuffer' declared here}}
8+
// expected-note@? {{'SamplerState' declared here}}
9+
// expected-note@? {{'TriangleStream' declared here}}
10+
// expected-note@? {{'InputPatch' declared here}}
11+
// expected-note@? {{'OutputPatch' declared here}}
12+
// expected-note@? {{'RayDesc' declared here}}
13+
// expected-note@? {{'BuiltInTriangleIntersectionAttributes' declared here}}
14+
// expected-note@? {{'RaytracingAccelerationStructure' declared here}}
15+
// expected-note@? {{'GlobalRootSignature' declared here}}
216

317
struct F2 : float2 {}; // expected-error {{base 'vector' is marked 'final'}} fxc-error {{X3094: base type is not a struct, class or interface}}
418
struct F4x4 : float4x4 {}; // expected-error {{base 'matrix' is marked 'final'}} fxc-error {{X3094: base type is not a struct, class or interface}}
@@ -17,4 +31,4 @@ struct BITIA : BuiltInTriangleIntersectionAttributes {}; // expected-error {{bas
1731
struct RTAS : RaytracingAccelerationStructure {}; // expected-error {{base 'RaytracingAccelerationStructure' is marked 'final'}} fxc-error {{X3000: syntax error: unexpected token 'RaytracingAccelerationStructure'}}
1832
struct GRS : GlobalRootSignature {}; // expected-error {{base 'GlobalRootSignature' is marked 'final'}} fxc-error {{X3000: syntax error: unexpected token 'GlobalRootSignature'}}
1933

20-
void main() {}
34+
void main() {}

tools/clang/test/HLSL/conversions-between-type-shapes-strictudt.hlsl

Lines changed: 79 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %clang_cc1 -HV 2021 -Wno-unused-value -fsyntax-only -ffreestanding -verify -verify-ignore-unexpected=note %s
1+
// RUN: %clang_cc1 -HV 2021 -Wno-unused-value -fsyntax-only -ffreestanding -verify %s
22

33
// Tests all implicit conversions and explicit casts between type shapes
44
// (scalars, vectors, matrices, arrays and structs).
@@ -26,22 +26,99 @@ struct DerivedFrom_S2 : S2 {
2626
int c;
2727
};
2828

29-
// Clang generates a bunch of "notes" about overload candidates here, but we're not testing for these
29+
// Clang generates a bunch of "notes" about overload candidates here, we're not testing for these
30+
// Just avoid use -verify-ignore-unexpected.
31+
32+
// expected-note@+4 {{candidate function not viable: no known conversion from 'A1' (aka 'int [1]') to 'int' for 1st argument}}
33+
// expected-note@+3 {{candidate function not viable: no known conversion from 'S1' to 'int' for 1st argument}}
34+
// expected-note@+2 {{candidate function not viable: no known conversion from 'A2' (aka 'int [2]') to 'int' for 1st argument}}
35+
// expected-note@+1 {{candidate function not viable: no known conversion from 'S2' to 'int' for 1st argument}}
3036
void to_i(int i) {}
37+
// expected-note@+4 {{candidate function not viable: no known conversion from 'A2' (aka 'int [2]') to 'int1' for 1st argument}}
38+
// expected-note@+3 {{candidate function not viable: no known conversion from 'S2' to 'int1' for 1st argument}}
39+
// expected-note@+2 {{candidate function not viable: no known conversion from 'A1' (aka 'int [1]') to 'int1' for 1st argument}}
40+
// expected-note@+1 {{candidate function not viable: no known conversion from 'S1' to 'int1' for 1st argument}}
3141
void to_v1(int1 v) {}
42+
// expected-note@+4 {{candidate function not viable: no known conversion from 'A2' (aka 'int [2]') to 'int2' for 1st argument}}
43+
// expected-note@+3 {{candidate function not viable: no known conversion from 'S2' to 'int2' for 1st argument}}
44+
// expected-note@+2 {{candidate function not viable: no known conversion from 'A4' (aka 'int [4]') to 'int2' for 1st argument}}
45+
// expected-note@+1 {{candidate function not viable: no known conversion from 'S4' to 'int2' for 1st argument}}
3246
void to_v2(int2 v) {}
3347
void to_v4(int4 v) {}
48+
// expected-note@+4 {{candidate function not viable: no known conversion from 'A1' (aka 'int [1]') to 'int1x1' for 1st argument}}
49+
// expected-note@+3 {{candidate function not viable: no known conversion from 'S1' to 'int1x1' for 1st argument}}
50+
// expected-note@+2 {{candidate function not viable: no known conversion from 'A2' (aka 'int [2]') to 'int1x1' for 1st argument}}
51+
// expected-note@+1 {{candidate function not viable: no known conversion from 'S2' to 'int1x1' for 1st argument}}
3452
void to_m1x1(int1x1 m) {}
53+
// expected-note@+4 {{candidate function not viable: no known conversion from 'A2' (aka 'int [2]') to 'int1x2' for 1st argument}}
54+
// expected-note@+3 {{candidate function not viable: no known conversion from 'S2' to 'int1x2' for 1st argument}}
55+
// expected-note@+2 {{candidate function not viable: no known conversion from 'A4' (aka 'int [4]') to 'int1x2' for 1st argument}}
56+
// expected-note@+1 {{candidate function not viable: no known conversion from 'S4' to 'int1x2' for 1st argument}}
3557
void to_m1x2(int1x2 m) {}
58+
// expected-note@+4 {{candidate function not viable: no known conversion from 'S4' to 'int2x1' for 1st argument}}
59+
// expected-note@+3 {{candidate function not viable: no known conversion from 'A4' (aka 'int [4]') to 'int2x1' for 1st argument}}
60+
// expected-note@+2 {{candidate function not viable: no known conversion from 'S2' to 'int2x1' for 1st argument}}
61+
// expected-note@+1 {{candidate function not viable: no known conversion from 'A2' (aka 'int [2]') to 'int2x1' for 1st argument}}
3662
void to_m2x1(int2x1 m) {}
63+
// expected-note@+4 {{candidate function not viable: no known conversion from 'S5' to 'int2x2' for 1st argument}}
64+
// expected-note@+3 {{candidate function not viable: no known conversion from 'A5' (aka 'int [5]') to 'int2x2' for 1st argument}}
65+
// expected-note@+2 {{candidate function not viable: no known conversion from 'S4' to 'int2x2' for 1st argument}}
66+
// expected-note@+1 {{candidate function not viable: no known conversion from 'A4' (aka 'int [4]') to 'int2x2' for 1st argument}}
3767
void to_m2x2(int2x2 m) {}
3868
void to_m3x3(int3x3 m) {}
69+
// expected-note@+8 {{candidate function not viable: no known conversion from 'int' to 'A1' (aka 'int [1]') for 1st argument}}
70+
// expected-note@+7 {{candidate function not viable: no known conversion from 'int1' to 'A1' (aka 'int [1]') for 1st argument}}
71+
// expected-note@+6 {{candidate function not viable: no known conversion from 'int1x1' to 'A1' (aka 'int [1]') for 1st argument}}
72+
// expected-note@+5 {{candidate function not viable: no known conversion from 'S1' to 'A1' (aka 'int [1]') for 1st argument}}
73+
// expected-note@+4 {{candidate function not viable: no known conversion from 'int2' to 'A1' (aka 'int [1]') for 1st argument}}
74+
// expected-note@+3 {{candidate function not viable: no known conversion from 'int2x2' to 'A1' (aka 'int [1]') for 1st argument}}
75+
// expected-note@+2 {{candidate function not viable: no known conversion from 'A2' (aka 'int [2]') to 'A1' (aka 'int [1]') for 1st argument}}
76+
// expected-note@+1 {{candidate function not viable: no known conversion from 'S2' to 'A1' (aka 'int [1]') for 1st argument}}
3977
void to_a1(A1 a) {}
78+
// expected-note@+14 {{candidate function not viable: no known conversion from 'int' to 'A2' (aka 'int [2]') for 1st argument}}
79+
// expected-note@+13 {{candidate function not viable: no known conversion from 'int1' to 'A2' (aka 'int [2]') for 1st argument}}
80+
// expected-note@+12 {{candidate function not viable: no known conversion from 'int1x1' to 'A2' (aka 'int [2]') for 1st argument}}
81+
// expected-note@+11 {{candidate function not viable: no known conversion from 'int2' to 'A2' (aka 'int [2]') for 1st argument}}
82+
// expected-note@+10 {{candidate function not viable: no known conversion from 'int1x2' to 'A2' (aka 'int [2]') for 1st argument}}
83+
// expected-note@+9 {{candidate function not viable: no known conversion from 'int2x1' to 'A2' (aka 'int [2]') for 1st argument}}
84+
// expected-note@+8 {{candidate function not viable: no known conversion from 'S2' to 'A2' (aka 'int [2]') for 1st argument}}
85+
// expected-note@+7 {{candidate function not viable: no known conversion from 'int4' to 'A2' (aka 'int [2]') for 1st argument}}
86+
// expected-note@+6 {{candidate function not viable: no known conversion from 'int1x3' to 'A2' (aka 'int [2]') for 1st argument}}
87+
// expected-note@+5 {{candidate function not viable: no known conversion from 'int3x1' to 'A2' (aka 'int [2]') for 1st argument}}
88+
// expected-note@+4 {{candidate function not viable: no known conversion from 'int2x2' to 'A2' (aka 'int [2]') for 1st argument}}
89+
// expected-note@+3 {{candidate function not viable: no known conversion from 'int3x3' to 'A2' (aka 'int [2]') for 1st argument}}
90+
// expected-note@+2 {{candidate function not viable: no known conversion from 'A4' (aka 'int [4]') to 'A2' (aka 'int [2]') for 1st argument}}
91+
// expected-note@+1 {{candidate function not viable: no known conversion from 'S4' to 'A2' (aka 'int [2]') for 1st argument}}
4092
void to_a2(A2 a) {}
93+
// expected-note@+1 {{candidate function not viable: no known conversion from 'int2x2' to 'A4' (aka 'int [4]') for 1st argument}}
4194
void to_a4(A4 a) {}
4295
void to_a5(A5 a) {}
96+
// expected-note@+8 {{candidate function not viable: no known conversion from 'int' to 'S1' for 1st argument}}
97+
// expected-note@+7 {{candidate function not viable: no known conversion from 'int1' to 'S1' for 1st argument}}
98+
// expected-note@+6 {{candidate function not viable: no known conversion from 'int1x1' to 'S1' for 1st argument}}
99+
// expected-note@+5 {{candidate function not viable: no known conversion from 'A1' (aka 'int [1]') to 'S1' for 1st argument}}
100+
// expected-note@+4 {{candidate function not viable: no known conversion from 'int2' to 'S1' for 1st argument}}
101+
// expected-note@+3 {{candidate function not viable: no known conversion from 'int2x2' to 'S1' for 1st argument}}
102+
// expected-note@+2 {{candidate function not viable: no known conversion from 'A2' (aka 'int [2]') to 'S1' for 1st argument}}
103+
// expected-note@+1 {{candidate function not viable: no known conversion from 'S2' to 'S1' for 1st argument}}
43104
void to_s1(S1 s) {}
105+
// expected-note@+15 {{candidate function not viable: no known conversion from 'int' to 'S2' for 1st argument}}
106+
// expected-note@+14 {{candidate function not viable: no known conversion from 'int1' to 'S2' for 1st argument}}
107+
// expected-note@+13 {{candidate function not viable: no known conversion from 'int1x1' to 'S2' for 1st argument}}
108+
// expected-note@+12 {{candidate function not viable: no known conversion from 'int2' to 'S2' for 1st argument}}
109+
// expected-note@+11 {{candidate function not viable: no known conversion from 'int1x2' to 'S2' for 1st argument}}
110+
// expected-note@+10 {{candidate function not viable: no known conversion from 'int2x1' to 'S2' for 1st argument}}
111+
// expected-note@+9 {{candidate function not viable: no known conversion from 'A2' (aka 'int [2]') to 'S2' for 1st argument}}
112+
// expected-note@+8 {{candidate function not viable: no known conversion from 'Like_S2' to 'S2' for 1st argument}}
113+
// expected-note@+7 {{candidate function not viable: no known conversion from 'int4' to 'S2' for 1st argument}}
114+
// expected-note@+6 {{candidate function not viable: no known conversion from 'int1x3' to 'S2' for 1st argument}}
115+
// expected-note@+5 {{candidate function not viable: no known conversion from 'int3x1' to 'S2' for 1st argument}}
116+
// expected-note@+4 {{candidate function not viable: no known conversion from 'int2x2' to 'S2' for 1st argument}}
117+
// expected-note@+3 {{candidate function not viable: no known conversion from 'int3x3' to 'S2' for 1st argument}}
118+
// expected-note@+2 {{candidate function not viable: no known conversion from 'A4' (aka 'int [4]') to 'S2' for 1st argument}}
119+
// expected-note@+1 {{candidate function not viable: no known conversion from 'S4' to 'S2' for 1st argument}}
44120
void to_s2(S2 s) {}
121+
// expected-note@+1 {{candidate function not viable: no known conversion from 'int2x2' to 'S4' for 1st argument}}
45122
void to_s4(S4 s) {}
46123
void to_s5(S5 s) {}
47124

0 commit comments

Comments
 (0)