@@ -773,7 +773,7 @@ void SemaHLSL::ActOnTopLevelFunction(FunctionDecl *FD) {
773773
774774bool SemaHLSL::determineActiveSemanticOnScalar (
775775 FunctionDecl *FD, DeclaratorDecl *OutputDecl, DeclaratorDecl *D,
776- SemanticInfo &ActiveSemantic, llvm::StringSet<> &ActiveInputSemantics ) {
776+ SemanticInfo &ActiveSemantic, llvm::StringSet<> &UsedSemantics ) {
777777 if (ActiveSemantic.Semantic == nullptr ) {
778778 ActiveSemantic.Semantic = D->getAttr <HLSLParsedSemanticAttr>();
779779 if (ActiveSemantic.Semantic )
@@ -805,7 +805,7 @@ bool SemaHLSL::determineActiveSemanticOnScalar(
805805 for (unsigned I = 0 ; I < ElementCount; ++I) {
806806 Twine VariableName = BaseName.concat (Twine (Location + I));
807807
808- auto [_, Inserted] = ActiveInputSemantics .insert (VariableName.str ());
808+ auto [_, Inserted] = UsedSemantics .insert (VariableName.str ());
809809 if (!Inserted) {
810810 Diag (D->getLocation (), diag::err_hlsl_semantic_index_overlap)
811811 << VariableName.str ();
@@ -818,7 +818,7 @@ bool SemaHLSL::determineActiveSemanticOnScalar(
818818
819819bool SemaHLSL::determineActiveSemantic (
820820 FunctionDecl *FD, DeclaratorDecl *OutputDecl, DeclaratorDecl *D,
821- SemanticInfo &ActiveSemantic, llvm::StringSet<> &ActiveInputSemantics ) {
821+ SemanticInfo &ActiveSemantic, llvm::StringSet<> &UsedSemantics ) {
822822 if (ActiveSemantic.Semantic == nullptr ) {
823823 ActiveSemantic.Semantic = D->getAttr <HLSLParsedSemanticAttr>();
824824 if (ActiveSemantic.Semantic )
@@ -831,13 +831,13 @@ bool SemaHLSL::determineActiveSemantic(
831831 const RecordType *RT = dyn_cast<RecordType>(T);
832832 if (!RT)
833833 return determineActiveSemanticOnScalar (FD, OutputDecl, D, ActiveSemantic,
834- ActiveInputSemantics );
834+ UsedSemantics );
835835
836836 const RecordDecl *RD = RT->getDecl ();
837837 for (FieldDecl *Field : RD->fields ()) {
838838 SemanticInfo Info = ActiveSemantic;
839839 if (!determineActiveSemantic (FD, OutputDecl, Field, Info,
840- ActiveInputSemantics )) {
840+ UsedSemantics )) {
841841 Diag (Field->getLocation (), diag::note_hlsl_semantic_used_here) << Field;
842842 return false ;
843843 }
0 commit comments