Skip to content

Commit cb816bd

Browse files
committed
rename function
1 parent 5f5c43a commit cb816bd

File tree

2 files changed

+11
-10
lines changed

2 files changed

+11
-10
lines changed

clang/include/clang/Sema/SemaHLSL.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -259,10 +259,10 @@ class SemaHLSL : public SemaBase {
259259
const HLSLSemanticAttr *SemanticAttr);
260260
HLSLSemanticAttr *createSemantic(const SemanticInfo &Semantic,
261261
Decl *TargetDecl);
262-
bool isSemanticOnScalarValid(FunctionDecl *FD, DeclaratorDecl *D,
262+
bool determineActiveSemanticOnScalar(FunctionDecl *FD, DeclaratorDecl *D,
263+
SemanticInfo &ActiveSemantic);
264+
bool determineActiveSemantic(FunctionDecl *FD, DeclaratorDecl *D,
263265
SemanticInfo &ActiveSemantic);
264-
bool isSemanticValid(FunctionDecl *FD, DeclaratorDecl *D,
265-
SemanticInfo &ActiveSemantic);
266266

267267
void processExplicitBindingsOnDecl(VarDecl *D);
268268

clang/lib/Sema/SemaHLSL.cpp

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)