31 lines · plain
1// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.3-library -x hlsl -std=hlsl202x -o - -fsyntax-only %s -verify2// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.3-library -x hlsl -std=hlsl202y -o - -fsyntax-only %s -verify3 4#if __HLSL_VERSION < 20295// expected-warning@#func{{'auto' type specifier is a HLSL 202y extension}}6// expected-warning@#func_gs{{'auto' type specifier is a HLSL 202y extension}}7// expected-warning@#l{{'auto' type specifier is a HLSL 202y extension}}8// expected-warning@#l2{{'auto' type specifier is a HLSL 202y extension}}9#endif10 11// expected-error@#func {{return type cannot be qualified with address space}}12auto func() -> groupshared void; // #func13 14// expected-error@#func_gs {{parameter may not be qualified with an address space}}15auto func(float groupshared) -> void; // #func_gs16 17 18// expected-error@#l {{parameter may not be qualified with an address space}}19// expected-warning@#l {{lambdas are a clang HLSL extension}}20auto l = [](groupshared float ) {}; // #l21 22// expected-error@#l2 {{return type cannot be qualified with address space}}23// expected-warning@#l2 {{lambdas are a clang HLSL extension}}24auto l2 = []() -> groupshared void {}; // #l225 26struct S {27// expected-error@+1 {{return type cannot be qualified with address space}}28operator groupshared int() const;29 30};31