Skip to content

Commit 1a92a22

Browse files
Greg Rothtex3d
authored andcommitted
Rename payload qualifier field to not match type (#3607)
Some compilers (gcc) get really unhappy when your field name matches the type name. In the defense of such, it does make you wonder what sizeof() would return if the member were not of its namesake's type. Anyway, gcc should be able to build. This renames the member to differ from the type to make all the Gnus happy. (cherry picked from commit 220e884)
1 parent a7c46bf commit 1a92a22

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

tools/clang/lib/Sema/SemaDXR.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ struct PayloadAccessInfo {
6767
};
6868

6969
struct DxrShaderDiagnoseInfo {
70-
const FunctionDecl *FunctionDecl;
70+
const FunctionDecl *funcDecl;
7171
const VarDecl *Payload;
7272
DXIL::PayloadAccessShaderStage Stage;
7373
std::vector<TraceRayCall> TraceCalls;
@@ -689,7 +689,7 @@ DiagnosePayloadAsFunctionArg(
689689
}
690690

691691
if (CalleeInfo.Payload) {
692-
CalleeInfo.FunctionDecl = CalledFunction;
692+
CalleeInfo.funcDecl = CalledFunction;
693693
CalleeInfo.Stage = Info.Stage;
694694
auto FieldsToIgnoreRead = CollectDominatingWritesForCall(Use, Info, DT);
695695
auto FieldsToIgnoreWrite = CollectReachableWritesForCall(Use, Info);
@@ -925,7 +925,7 @@ DiagnosePayloadAccess(Sema &S, DxrShaderDiagnoseInfo &Info,
925925
clang::DominatorTree DT;
926926
AnalysisDeclContextManager AnalysisManager;
927927
AnalysisDeclContext *AnalysisContext =
928-
AnalysisManager.getContext(Info.FunctionDecl);
928+
AnalysisManager.getContext(Info.funcDecl);
929929

930930
CFG &TheCFG = *AnalysisContext->getCFG();
931931
DT.buildDominatorTree(*AnalysisContext);
@@ -1093,7 +1093,7 @@ class DXRShaderVisitor : public RecursiveASTVisitor<DXRShaderVisitor> {
10931093
DiagnosePayloadParameter(S, Payload, Decl, Stage);
10941094
}
10951095
DxrShaderDiagnoseInfo Info;
1096-
Info.FunctionDecl = Decl;
1096+
Info.funcDecl = Decl;
10971097
Info.Payload = Payload;
10981098
Info.Stage = Stage;
10991099

@@ -1116,4 +1116,4 @@ void DiagnoseRaytracingPayloadAccess(clang::Sema &S,
11161116
visitor.diagnose(TU);
11171117
}
11181118

1119-
} // namespace hlsl
1119+
} // namespace hlsl

0 commit comments

Comments
 (0)