File: hlsl_parameter_modifiers.cpp

package info (click to toggle)
llvm-toolchain-19 1%3A19.1.7-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,998,520 kB
  • sloc: cpp: 6,951,680; ansic: 1,486,157; asm: 913,598; python: 232,024; f90: 80,126; objc: 75,281; lisp: 37,276; pascal: 16,990; sh: 10,009; ml: 5,058; perl: 4,724; awk: 3,523; makefile: 3,167; javascript: 2,504; xml: 892; fortran: 664; cs: 573
file content (50 lines) | stat: -rw-r--r-- 1,653 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
// RUN: %clang_cc1 %s -verify

// expected-error@#fn{{unknown type name 'in'}}
// expected-error@#fn{{expected ')'}}
// expected-note@#fn{{to match this '('}}
void fn(in out float f); // #fn

// expected-error@#fn2{{unknown type name 'in'}}
// expected-error@#fn2{{expected ')'}}
// expected-note@#fn2{{to match this '('}}
void fn2(in in float f); // #fn2

// expected-error@#fn3{{unknown type name 'out'}}
// expected-error@#fn3{{expected ')'}}
// expected-note@#fn3{{to match this '('}}
void fn3(out out float f); // #fn3

// expected-error@#fn4{{unknown type name 'inout'}}
// expected-error@#fn4{{expected ')'}}
// expected-note@#fn4{{to match this '('}}
void fn4(inout in out float f); // #fn4

// expected-error@#fn5{{unknown type name 'inout'}}
// expected-error@#fn5{{expected ')'}}
// expected-note@#fn5{{to match this '('}}
void fn5(inout in float f); // #fn5

// expected-error@#fn6{{unknown type name 'inout'}}
// expected-error@#fn6{{expected ')'}}
// expected-note@#fn6{{to match this '('}}
void fn6(inout out float f); // #fn6

void implicitFn(float f);

// expected-error@#inFn{{unknown type name 'in'}}
void inFn(in float f); // #inFn

// expected-error@#inoutFn{{unknown type name 'inout'}}
void inoutFn(inout float f); // #inoutFn

// expected-error@#outFn{{unknown type name 'out'}}
void outFn(out float f); // #outFn

// expected-error@#fn7{{unknown type name 'inout'}}
// expected-error@#fn7{{declaration of 'T' shadows template parameter}}
// expected-error@#fn7{{expected ')'}}
// expected-note@#fn7{{to match this '('}}
template <typename T> // expected-note{{template parameter is declared here}}
void fn7(inout T f); // #fn7