1 // RUN: %clang_cc1 -finclude-default-header -triple dxil-pc-shadermodel6.6-library %s -verify
3 void increment(inout int Arr[2]) {
4 for (int I = 0; I < 2; I++)
8 export int wrongSize() {
9 int A[3] = { 0, 1, 2 };
11 // expected-error@-1 {{no matching function for call to 'increment'}}
12 // expected-note@*:* {{candidate function not viable: no known conversion from 'int[3]' to 'int[2]' for 1st argument}}
16 export int wrongSize2() {
19 // expected-error@-1 {{no matching function for call to 'increment'}}
20 // expected-note@*:* {{candidate function not viable: no known conversion from 'int[1]' to 'int[2]' for 1st argument}}
24 export void tooFewArgs() {
26 // expected-error@-1 {{no matching function for call to 'increment'}}
27 // expected-note@*:* {{candidate function not viable: requires single argument 'Arr', but no arguments were provided}}
30 export float wrongType() {
31 float A[2] = { 0, 1 };
33 // expected-error@-1 {{no matching function for call to 'increment'}}
34 // expected-note@*:* {{candidate function not viable: no known conversion from 'float[2]' to 'int[2]' for 1st argument}}
38 export int wrongType2() {
40 // expected-error@-1 {{no matching function for call to 'increment'}}
41 // expected-note@*:* {{candidate function not viable: no known conversion from 'int' to 'int[2]' for 1st argument}}
45 export void tooManyArgs() {
49 // expected-error@-1 {{no matching function for call to 'increment'}}
50 // expected-note@*:* {{candidate function not viable: requires single argument 'Arr', but 2 arguments were provided}}