Skip to content

Commit 16cd5e7

Browse files
committed
[HLSL][NFC] Rename functions that process resource bindings
1 parent 1e7624c commit 16cd5e7

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

clang/include/clang/Sema/SemaHLSL.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -160,9 +160,9 @@ class SemaHLSL : public SemaBase {
160160
ResourceBindings Bindings;
161161

162162
private:
163-
void collectResourcesOnVarDecl(VarDecl *D);
164-
void collectResourcesOnUserRecordDecl(const VarDecl *VD,
165-
const RecordType *RT);
163+
void collectResourceBindingsOnVarDecl(VarDecl *D);
164+
void collectResourceBindingsOnUserRecordDecl(const VarDecl *VD,
165+
const RecordType *RT);
166166
void processExplicitBindingsOnDecl(VarDecl *D);
167167
};
168168

clang/lib/Sema/SemaHLSL.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1323,8 +1323,8 @@ SemaHLSL::TakeLocForHLSLAttribute(const HLSLAttributedResourceType *RT) {
13231323

13241324
// Walks though the global variable declaration, collects all resource binding
13251325
// requirements and adds them to Bindings
1326-
void SemaHLSL::collectResourcesOnUserRecordDecl(const VarDecl *VD,
1327-
const RecordType *RT) {
1326+
void SemaHLSL::collectResourceBindingsOnUserRecordDecl(const VarDecl *VD,
1327+
const RecordType *RT) {
13281328
const RecordDecl *RD = RT->getDecl();
13291329
for (FieldDecl *FD : RD->fields()) {
13301330
const Type *Ty = FD->getType()->getUnqualifiedDesugaredType();
@@ -1354,15 +1354,15 @@ void SemaHLSL::collectResourcesOnUserRecordDecl(const VarDecl *VD,
13541354
// binding, which is something we are probably going to need to do later
13551355
// on. Hopefully nesting of structs in structs too many levels is
13561356
// unlikely.
1357-
collectResourcesOnUserRecordDecl(VD, RT);
1357+
collectResourceBindingsOnUserRecordDecl(VD, RT);
13581358
}
13591359
}
13601360
}
13611361

13621362
// Diagnore localized register binding errors for a single binding; does not
13631363
// diagnose resource binding on user record types, that will be done later
13641364
// in processResourceBindingOnDecl based on the information collected in
1365-
// collectResourcesOnVarDecl.
1365+
// collectResourceBindingsOnVarDecl.
13661366
// Returns false if the register binding is not valid.
13671367
static bool DiagnoseLocalRegisterBinding(Sema &S, SourceLocation &ArgLoc,
13681368
Decl *D, RegisterType RegType,
@@ -2788,7 +2788,7 @@ void SemaHLSL::ActOnVariableDeclarator(VarDecl *VD) {
27882788

27892789
// find all resources on decl
27902790
if (VD->getType()->isHLSLIntangibleType())
2791-
collectResourcesOnVarDecl(VD);
2791+
collectResourceBindingsOnVarDecl(VD);
27922792

27932793
// process explicit bindings
27942794
processExplicitBindingsOnDecl(VD);
@@ -2797,7 +2797,7 @@ void SemaHLSL::ActOnVariableDeclarator(VarDecl *VD) {
27972797

27982798
// Walks though the global variable declaration, collects all resource binding
27992799
// requirements and adds them to Bindings
2800-
void SemaHLSL::collectResourcesOnVarDecl(VarDecl *VD) {
2800+
void SemaHLSL::collectResourceBindingsOnVarDecl(VarDecl *VD) {
28012801
assert(VD->hasGlobalStorage() && VD->getType()->isHLSLIntangibleType() &&
28022802
"expected global variable that contains HLSL resource");
28032803

@@ -2826,7 +2826,7 @@ void SemaHLSL::collectResourcesOnVarDecl(VarDecl *VD) {
28262826

28272827
// User defined record type
28282828
if (const RecordType *RT = dyn_cast<RecordType>(Ty))
2829-
collectResourcesOnUserRecordDecl(VD, RT);
2829+
collectResourceBindingsOnUserRecordDecl(VD, RT);
28302830
}
28312831

28322832
// Walks though the explicit resource binding attributes on the declaration,

0 commit comments

Comments
 (0)