[clang] [HLSL] Rewrite semantics parsing (PR #152537)
Nathan Gauër via cfe-commits
cfe-commits at lists.llvm.org
Tue Sep 9 05:29:29 PDT 2025
================
@@ -4943,13 +4932,35 @@ def HLSLResourceBinding: InheritableAttr {
}];
}
-def HLSLSV_Position : HLSLAnnotationAttr {
- let Spellings = [HLSLAnnotation<"sv_position">];
- let Subjects = SubjectList<[ParmVar, Field]>;
+def HLSLUnparsedSemantic : HLSLAnnotationAttr {
+ let Spellings = [];
+ let Args = [DefaultIntArgument<"Index", 0>,
+ DefaultBoolArgument<"ExplicitIndex", 0>];
+ let Subjects = SubjectList<[ParmVar, Field, Function]>;
let LangOpts = [HLSL];
+ let Documentation = [InternalOnly];
+}
+
+def HLSLSV_Position : HLSLSemanticAttr</* Indexable= */ 1> {
let Documentation = [HLSLSV_PositionDocs];
}
+def HLSLSV_GroupThreadID : HLSLSemanticAttr</* Indexable= */ 0> {
----------------
Keenuts wrote:
Doing this might not be a complete benefit as we'd lose the ability to put some constraints in the TD file (like `Indexable` here).
Created https://github.com/llvm/llvm-project/issues/157659 to track this
https://github.com/llvm/llvm-project/pull/152537
More information about the cfe-commits
mailing list