File: group_shared_202x.hlsl

package info (click to toggle)
llvm-toolchain-21 1%3A21.1.0-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 2,235,796 kB
  • sloc: cpp: 7,617,614; ansic: 1,433,901; asm: 1,058,726; python: 252,096; f90: 94,671; objc: 70,753; lisp: 42,813; pascal: 18,401; sh: 10,032; ml: 5,111; perl: 4,720; awk: 3,523; makefile: 3,401; javascript: 2,272; xml: 892; fortran: 770
file content (30 lines) | stat: -rw-r--r-- 1,312 bytes parent folder | download | duplicates (6)
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
// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.3-library -x hlsl -std=hlsl202x  -o - -fsyntax-only %s -verify
// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.3-library -x hlsl -std=hlsl202y  -o - -fsyntax-only %s -verify

#if __HLSL_VERSION < 2029
// expected-warning@#func{{'auto' type specifier is a HLSL 202y extension}}
// expected-warning@#func_gs{{'auto' type specifier is a HLSL 202y extension}}
// expected-warning@#l{{'auto' type specifier is a HLSL 202y extension}}
// expected-warning@#l2{{'auto' type specifier is a HLSL 202y extension}}
#endif

// expected-error@#func {{return type cannot be qualified with address space}}
auto func() -> groupshared void; // #func

// expected-error@#func_gs {{parameter may not be qualified with an address space}}
auto func(float groupshared) -> void; // #func_gs


// expected-error@#l {{parameter may not be qualified with an address space}}
// expected-warning@#l {{lambdas are a clang HLSL extension}}
auto l = [](groupshared float ) {}; // #l

// expected-error@#l2 {{return type cannot be qualified with address space}}
// expected-warning@#l2 {{lambdas are a clang HLSL extension}}
auto l2 = []() -> groupshared void {}; // #l2

struct S {
// expected-error@+1 {{return type cannot be qualified with address space}}
operator groupshared int() const;

};