diff clang/test/SemaHLSL/group_shared_202x.hlsl @ 236:c4bab56944e8 llvm-original

LLVM 16
author kono
date Wed, 09 Nov 2022 17:45:10 +0900
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/clang/test/SemaHLSL/group_shared_202x.hlsl	Wed Nov 09 17:45:10 2022 +0900
@@ -0,0 +1,19 @@
+// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.3-library -x hlsl -std=hlsl202x  -o - -fsyntax-only %s -verify
+
+// expected-error@+1 {{return type cannot be qualified with address space}}
+auto func() -> groupshared void;
+
+// expected-error@+1 {{parameter may not be qualified with an address space}}
+auto func(float groupshared) -> void;
+
+// expected-error@+1 {{parameter may not be qualified with an address space}}
+auto l = [](groupshared float ) {};
+
+// expected-error@+1 {{return type cannot be qualified with address space}}
+auto l2 = []() -> groupshared void {};
+
+struct S {
+// expected-error@+1 {{return type cannot be qualified with address space}}
+operator groupshared int() const;
+
+};