45 lines · plain
1// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.0-compute -x hlsl -o - %s -verify2// RUN: %clang_cc1 -triple spirv-unknown-vulkan1.3-compute -x hlsl -o - %s -verify3 4// expected-error@+1 {{expected HLSL Semantic identifier}}5void Entry(int GI : ) { }6 7// expected-error@+1 {{unknown HLSL semantic 'SV_IWantAPony'}}8void Pony(int GI : SV_IWantAPony) { }9 10// expected-error@+3 {{expected HLSL Semantic identifier}}11// expected-error@+2 {{expected ')'}}12// expected-note@+1 {{to match this '('}}13void SuperPony(int GI : 0) { }14 15// '_' is a valid CPP identifier.16void MegaPony(int GI : _) { }17 18void GarguantuanPony(int GI : _1) { }19 20void CoolPony(int GI : A0A0) { }21 22void NicePony(int GI : A_0) { }23 24void CutePony(int GI : A00) { }25 26// expected-error@+2 {{expected ')'}}27// expected-note@+1 {{to match this '('}}28void DoublePony(int GI : A00 B) { }29 30// Unicode can be used:31// https://timsong-cpp.github.io/cppwp/n3337/charname.allowed32void FrenchPony(int GI : garçon_de_café) { }33void UnicodePony(int GI : ℮) { }34 35// Since P1949 seems Emojis are not allowed, even if in the range36// mentioned in N3337.37// https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2021/p1949r7.html38 39// expected-error@+2 {{unexpected character <U+1F60A>}}40// expected-error@+1 {{expected HLSL Semantic identifier}}41void UTFPony(int GI : 😊) { }42 43// expected-error@+1 {{character <U+1F60A> not allowed in an identifier}}44void SmilingPony(int GI : PonyWithA😊) { }45