@@ -765,8 +765,7 @@ void SemaHLSL::handleWaveSizeAttr(Decl *D, const ParsedAttr &AL) {
765765 D->addAttr (NewAttr);
766766}
767767
768- bool SemaHLSL::isLegalTypeForHLSLSV_ThreadOrGroupID (QualType T,
769- const ParsedAttr &AL) {
768+ bool SemaHLSL::diagnoseInputIDType (QualType T, const ParsedAttr &AL) {
770769 const auto *VT = T->getAs <VectorType>();
771770
772771 if (!T->hasUnsignedIntegerRepresentation () ||
@@ -781,7 +780,7 @@ bool SemaHLSL::isLegalTypeForHLSLSV_ThreadOrGroupID(QualType T,
781780
782781void SemaHLSL::handleSV_DispatchThreadIDAttr (Decl *D, const ParsedAttr &AL) {
783782 auto *VD = cast<ValueDecl>(D);
784- if (!isLegalTypeForHLSLSV_ThreadOrGroupID (VD->getType (), AL))
783+ if (!diagnoseInputIDType (VD->getType (), AL))
785784 return ;
786785
787786 D->addAttr (::new (getASTContext ())
@@ -790,7 +789,7 @@ void SemaHLSL::handleSV_DispatchThreadIDAttr(Decl *D, const ParsedAttr &AL) {
790789
791790void SemaHLSL::handleSV_GroupIDAttr (Decl *D, const ParsedAttr &AL) {
792791 auto *VD = cast<ValueDecl>(D);
793- if (!isLegalTypeForHLSLSV_ThreadOrGroupID (VD->getType (), AL))
792+ if (!diagnoseInputIDType (VD->getType (), AL))
794793 return ;
795794
796795 D->addAttr (::new (getASTContext ()) HLSLSV_GroupIDAttr (getASTContext (), AL));
0 commit comments