xref: /llvm-project/clang/test/ParserHLSL/hlsl_parameter_modifiers.cpp (revision d4626216943f8c4712bd17a709e439a0ffd0006b)
1*d4626216SChris B // RUN: %clang_cc1 %s -verify
2*d4626216SChris B 
3*d4626216SChris B // expected-error@#fn{{unknown type name 'in'}}
4*d4626216SChris B // expected-error@#fn{{expected ')'}}
5*d4626216SChris B // expected-note@#fn{{to match this '('}}
6*d4626216SChris B void fn(in out float f); // #fn
7*d4626216SChris B 
8*d4626216SChris B // expected-error@#fn2{{unknown type name 'in'}}
9*d4626216SChris B // expected-error@#fn2{{expected ')'}}
10*d4626216SChris B // expected-note@#fn2{{to match this '('}}
11*d4626216SChris B void fn2(in in float f); // #fn2
12*d4626216SChris B 
13*d4626216SChris B // expected-error@#fn3{{unknown type name 'out'}}
14*d4626216SChris B // expected-error@#fn3{{expected ')'}}
15*d4626216SChris B // expected-note@#fn3{{to match this '('}}
16*d4626216SChris B void fn3(out out float f); // #fn3
17*d4626216SChris B 
18*d4626216SChris B // expected-error@#fn4{{unknown type name 'inout'}}
19*d4626216SChris B // expected-error@#fn4{{expected ')'}}
20*d4626216SChris B // expected-note@#fn4{{to match this '('}}
21*d4626216SChris B void fn4(inout in out float f); // #fn4
22*d4626216SChris B 
23*d4626216SChris B // expected-error@#fn5{{unknown type name 'inout'}}
24*d4626216SChris B // expected-error@#fn5{{expected ')'}}
25*d4626216SChris B // expected-note@#fn5{{to match this '('}}
26*d4626216SChris B void fn5(inout in float f); // #fn5
27*d4626216SChris B 
28*d4626216SChris B // expected-error@#fn6{{unknown type name 'inout'}}
29*d4626216SChris B // expected-error@#fn6{{expected ')'}}
30*d4626216SChris B // expected-note@#fn6{{to match this '('}}
31*d4626216SChris B void fn6(inout out float f); // #fn6
32*d4626216SChris B 
33*d4626216SChris B void implicitFn(float f);
34*d4626216SChris B 
35*d4626216SChris B // expected-error@#inFn{{unknown type name 'in'}}
36*d4626216SChris B void inFn(in float f); // #inFn
37*d4626216SChris B 
38*d4626216SChris B // expected-error@#inoutFn{{unknown type name 'inout'}}
39*d4626216SChris B void inoutFn(inout float f); // #inoutFn
40*d4626216SChris B 
41*d4626216SChris B // expected-error@#outFn{{unknown type name 'out'}}
42*d4626216SChris B void outFn(out float f); // #outFn
43*d4626216SChris B 
44*d4626216SChris B // expected-error@#fn7{{unknown type name 'inout'}}
45*d4626216SChris B // expected-error@#fn7{{declaration of 'T' shadows template parameter}}
46*d4626216SChris B // expected-error@#fn7{{expected ')'}}
47*d4626216SChris B // expected-note@#fn7{{to match this '('}}
48*d4626216SChris B template <typename T> // expected-note{{template parameter is declared here}}
49*d4626216SChris B void fn7(inout T f); // #fn7
50*d4626216SChris B 
51