llvm-project
49 строк · 1.6 Кб
1// RUN: %clang_cc1 %s -verify
2
3// expected-error@#fn{{unknown type name 'in'}}
4// expected-error@#fn{{expected ')'}}
5// expected-note@#fn{{to match this '('}}
6void fn(in out float f); // #fn7
8// expected-error@#fn2{{unknown type name 'in'}}
9// expected-error@#fn2{{expected ')'}}
10// expected-note@#fn2{{to match this '('}}
11void fn2(in in float f); // #fn212
13// expected-error@#fn3{{unknown type name 'out'}}
14// expected-error@#fn3{{expected ')'}}
15// expected-note@#fn3{{to match this '('}}
16void fn3(out out float f); // #fn317
18// expected-error@#fn4{{unknown type name 'inout'}}
19// expected-error@#fn4{{expected ')'}}
20// expected-note@#fn4{{to match this '('}}
21void fn4(inout in out float f); // #fn422
23// expected-error@#fn5{{unknown type name 'inout'}}
24// expected-error@#fn5{{expected ')'}}
25// expected-note@#fn5{{to match this '('}}
26void fn5(inout in float f); // #fn527
28// expected-error@#fn6{{unknown type name 'inout'}}
29// expected-error@#fn6{{expected ')'}}
30// expected-note@#fn6{{to match this '('}}
31void fn6(inout out float f); // #fn632
33void implicitFn(float f);34
35// expected-error@#inFn{{unknown type name 'in'}}
36void inFn(in float f); // #inFn37
38// expected-error@#inoutFn{{unknown type name 'inout'}}
39void inoutFn(inout float f); // #inoutFn40
41// expected-error@#outFn{{unknown type name 'out'}}
42void outFn(out float f); // #outFn43
44// expected-error@#fn7{{unknown type name 'inout'}}
45// expected-error@#fn7{{declaration of 'T' shadows template parameter}}
46// expected-error@#fn7{{expected ')'}}
47// expected-note@#fn7{{to match this '('}}
48template <typename T> // expected-note{{template parameter is declared here}}49void fn7(inout T f); // #fn750
51