@@ -795,8 +795,9 @@ HLSLSemanticAttr *SemaHLSL::createSemantic(const SemanticInfo &Info,
795795 return nullptr ;
796796}
797797
798- bool SemaHLSL::isSemanticOnScalarValid (FunctionDecl *FD, DeclaratorDecl *D,
799- SemanticInfo &ActiveSemantic) {
798+ bool SemaHLSL::determineActiveSemanticOnScalar (FunctionDecl *FD,
799+ DeclaratorDecl *D,
800+ SemanticInfo &ActiveSemantic) {
800801 if (ActiveSemantic.Semantic == nullptr ) {
801802 ActiveSemantic.Semantic = D->getAttr <HLSLSemanticAttr>();
802803 if (ActiveSemantic.Semantic &&
@@ -818,8 +819,8 @@ bool SemaHLSL::isSemanticOnScalarValid(FunctionDecl *FD, DeclaratorDecl *D,
818819 return true ;
819820}
820821
821- bool SemaHLSL::isSemanticValid (FunctionDecl *FD, DeclaratorDecl *D,
822- SemanticInfo &ActiveSemantic) {
822+ bool SemaHLSL::determineActiveSemantic (FunctionDecl *FD, DeclaratorDecl *D,
823+ SemanticInfo &ActiveSemantic) {
823824 if (ActiveSemantic.Semantic == nullptr ) {
824825 ActiveSemantic.Semantic = D->getAttr <HLSLSemanticAttr>();
825826 if (ActiveSemantic.Semantic &&
@@ -830,12 +831,12 @@ bool SemaHLSL::isSemanticValid(FunctionDecl *FD, DeclaratorDecl *D,
830831 const Type *T = D->getType ()->getUnqualifiedDesugaredType ();
831832 const RecordType *RT = dyn_cast<RecordType>(T);
832833 if (!RT)
833- return isSemanticOnScalarValid (FD, D, ActiveSemantic);
834+ return determineActiveSemanticOnScalar (FD, D, ActiveSemantic);
834835
835836 const RecordDecl *RD = RT->getOriginalDecl ();
836837 for (FieldDecl *Field : RD->fields ()) {
837838 SemanticInfo Info = ActiveSemantic;
838- if (!isSemanticValid (FD, Field, Info)) {
839+ if (!determineActiveSemantic (FD, Field, Info)) {
839840 Diag (Field->getLocation (), diag::note_hlsl_semantic_used_here) << Field;
840841 return false ;
841842 }
@@ -913,7 +914,7 @@ void SemaHLSL::CheckEntryPoint(FunctionDecl *FD) {
913914 ActiveSemantic.Semantic = nullptr ;
914915 ActiveSemantic.Index = std::nullopt ;
915916
916- if (!isSemanticValid (FD, Param, ActiveSemantic)) {
917+ if (!determineActiveSemantic (FD, Param, ActiveSemantic)) {
917918 Diag (Param->getLocation (), diag::note_previous_decl) << Param;
918919 FD->setInvalidDecl ();
919920 }
0 commit comments