[clang] [llvm] [HLSL] Add support for user semantics (PR #153424)

Steven Perron via cfe-commits cfe-commits at lists.llvm.org
Thu Oct 30 08:02:32 PDT 2025


Nathan =?utf-8?q?Gau=C3=ABr?= <brioche at google.com>
Message-ID:
In-Reply-To: <llvm.org/llvm/llvm-project/pull/153424 at github.com>


================
@@ -12,30 +12,33 @@ void Pony(int GI : SV_IWantAPony) { }
 // expected-note at +1 {{to match this '('}}
 void SuperPony(int GI : 0) { }
 
-// expected-error at +1 {{unknown HLSL semantic '_'}}
+// '_' is a valid CPP identifier.
 void MegaPony(int GI : _) { }
 
-// expected-error at +1 {{unknown HLSL semantic 'A0A'}}
+void GarguantuanPony(int GI : _1) { }
+
 void CoolPony(int GI : A0A0) { }
 
-// expected-error at +1 {{unknown HLSL semantic 'A_'}}
 void NicePony(int GI : A_0) { }
 
-// expected-error at +1 {{unknown HLSL semantic 'A'}}
 void CutePony(int GI : A00) { }
 
-// expected-error at +3 {{unknown HLSL semantic 'A'}}
 // expected-error at +2 {{expected ')'}}
 // expected-note at +1 {{to match this '('}}
 void DoublePony(int GI : A00 B) { }
 
-// expected-error at +1 {{unknown HLSL semantic 'é'}}
-void BigPony(int GI : é) { }
+// Unicode can be used:
+// https://timsong-cpp.github.io/cppwp/n3337/charname.allowed
+void FrenchPony(int GI : garçon_de_café) { }
+void UnicodePony(int GI : ℮) { }
+
+// Since P1949 seems Emojis are not allowed, even if in the range
+// mentionned in N3337.
----------------
s-perron wrote:

```suggestion
// mentioned in N3337.
```

https://github.com/llvm/llvm-project/pull/153424


More information about the cfe-commits mailing list