================
@@ -769,23 +769,81 @@ void SemaHLSL::ActOnTopLevelFunction(FunctionDecl *FD) {
}
}
-bool SemaHLSL::isSemanticValid(FunctionDecl *FD, DeclaratorDecl *D) {
- const auto *AnnotationAttr = D->getAttr<HLSLAnnotationAttr>();
- if (AnnotationAttr) {
- CheckSemanticAnnotation(FD, D, AnnotationAttr);
- return true;
+HLSLSemanticAttr *SemaHLSL::createSemantic(const SemanticInfo &Info,
+ DeclaratorDecl *TargetDecl) {
+ std::string SemanticName = Info.Semantic->getAttrName()->getName().upper();
+
+ if (SemanticName == "SV_DISPATCHTHREADID") {
----------------
Keenuts wrote:
Yes, agree we might want to do something like `SV_` prefix check (given the
entrypoint type etc). This is what later PRs with user semantic do. This PR is
keeping the current behavior (also the same diagnostic) for those system
semantics as the focus is on struct.
Keeping this as-is to stick to the scope about an early support for struct
semantics.
https://github.com/llvm/llvm-project/pull/159047
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits