@@ -795,8 +795,9 @@ HLSLSemanticAttr *SemaHLSL::createSemantic(const SemanticInfo &Info,
795
795
return nullptr ;
796
796
}
797
797
798
- bool SemaHLSL::isSemanticOnScalarValid (FunctionDecl *FD, DeclaratorDecl *D,
799
- SemanticInfo &ActiveSemantic) {
798
+ bool SemaHLSL::determineActiveSemanticOnScalar (FunctionDecl *FD,
799
+ DeclaratorDecl *D,
800
+ SemanticInfo &ActiveSemantic) {
800
801
if (ActiveSemantic.Semantic == nullptr ) {
801
802
ActiveSemantic.Semantic = D->getAttr <HLSLSemanticAttr>();
802
803
if (ActiveSemantic.Semantic &&
@@ -818,8 +819,8 @@ bool SemaHLSL::isSemanticOnScalarValid(FunctionDecl *FD, DeclaratorDecl *D,
818
819
return true ;
819
820
}
820
821
821
- bool SemaHLSL::isSemanticValid (FunctionDecl *FD, DeclaratorDecl *D,
822
- SemanticInfo &ActiveSemantic) {
822
+ bool SemaHLSL::determineActiveSemantic (FunctionDecl *FD, DeclaratorDecl *D,
823
+ SemanticInfo &ActiveSemantic) {
823
824
if (ActiveSemantic.Semantic == nullptr ) {
824
825
ActiveSemantic.Semantic = D->getAttr <HLSLSemanticAttr>();
825
826
if (ActiveSemantic.Semantic &&
@@ -830,12 +831,12 @@ bool SemaHLSL::isSemanticValid(FunctionDecl *FD, DeclaratorDecl *D,
830
831
const Type *T = D->getType ()->getUnqualifiedDesugaredType ();
831
832
const RecordType *RT = dyn_cast<RecordType>(T);
832
833
if (!RT)
833
- return isSemanticOnScalarValid (FD, D, ActiveSemantic);
834
+ return determineActiveSemanticOnScalar (FD, D, ActiveSemantic);
834
835
835
836
const RecordDecl *RD = RT->getOriginalDecl ();
836
837
for (FieldDecl *Field : RD->fields ()) {
837
838
SemanticInfo Info = ActiveSemantic;
838
- if (!isSemanticValid (FD, Field, Info)) {
839
+ if (!determineActiveSemantic (FD, Field, Info)) {
839
840
Diag (Field->getLocation (), diag::note_hlsl_semantic_used_here) << Field;
840
841
return false ;
841
842
}
@@ -913,7 +914,7 @@ void SemaHLSL::CheckEntryPoint(FunctionDecl *FD) {
913
914
ActiveSemantic.Semantic = nullptr ;
914
915
ActiveSemantic.Index = std::nullopt ;
915
916
916
- if (!isSemanticValid (FD, Param, ActiveSemantic)) {
917
+ if (!determineActiveSemantic (FD, Param, ActiveSemantic)) {
917
918
Diag (Param->getLocation (), diag::note_previous_decl) << Param;
918
919
FD->setInvalidDecl ();
919
920
}
0 commit comments