Pārlūkot izejas kodu

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.
Greg Roth 4 gadi atpakaļ
vecāks
revīzija
220e884560
1 mainītis faili ar 5 papildinājumiem un 5 dzēšanām
  1. 5 5
      tools/clang/lib/Sema/SemaDXR.cpp

+ 5 - 5
tools/clang/lib/Sema/SemaDXR.cpp

@@ -67,7 +67,7 @@ struct PayloadAccessInfo {
 };
 };
 
 
 struct DxrShaderDiagnoseInfo {
 struct DxrShaderDiagnoseInfo {
-  const FunctionDecl *FunctionDecl;
+  const FunctionDecl *funcDecl;
   const VarDecl *Payload;
   const VarDecl *Payload;
   DXIL::PayloadAccessShaderStage Stage;
   DXIL::PayloadAccessShaderStage Stage;
   std::vector<TraceRayCall> TraceCalls;
   std::vector<TraceRayCall> TraceCalls;
@@ -689,7 +689,7 @@ DiagnosePayloadAsFunctionArg(
       }
       }
 
 
       if (CalleeInfo.Payload) {
       if (CalleeInfo.Payload) {
-        CalleeInfo.FunctionDecl = CalledFunction;
+        CalleeInfo.funcDecl = CalledFunction;
         CalleeInfo.Stage = Info.Stage;
         CalleeInfo.Stage = Info.Stage;
         auto FieldsToIgnoreRead = CollectDominatingWritesForCall(Use, Info, DT);
         auto FieldsToIgnoreRead = CollectDominatingWritesForCall(Use, Info, DT);
         auto FieldsToIgnoreWrite = CollectReachableWritesForCall(Use, Info);
         auto FieldsToIgnoreWrite = CollectReachableWritesForCall(Use, Info);
@@ -925,7 +925,7 @@ DiagnosePayloadAccess(Sema &S, DxrShaderDiagnoseInfo &Info,
   clang::DominatorTree DT;
   clang::DominatorTree DT;
   AnalysisDeclContextManager AnalysisManager;
   AnalysisDeclContextManager AnalysisManager;
   AnalysisDeclContext *AnalysisContext =
   AnalysisDeclContext *AnalysisContext =
-      AnalysisManager.getContext(Info.FunctionDecl);
+      AnalysisManager.getContext(Info.funcDecl);
 
 
   CFG &TheCFG = *AnalysisContext->getCFG();
   CFG &TheCFG = *AnalysisContext->getCFG();
   DT.buildDominatorTree(*AnalysisContext);
   DT.buildDominatorTree(*AnalysisContext);
@@ -1093,7 +1093,7 @@ public:
         DiagnosePayloadParameter(S, Payload, Decl, Stage);
         DiagnosePayloadParameter(S, Payload, Decl, Stage);
       }
       }
       DxrShaderDiagnoseInfo Info;
       DxrShaderDiagnoseInfo Info;
-      Info.FunctionDecl = Decl;
+      Info.funcDecl = Decl;
       Info.Payload = Payload;
       Info.Payload = Payload;
       Info.Stage = Stage;
       Info.Stage = Stage;
 
 
@@ -1116,4 +1116,4 @@ void DiagnoseRaytracingPayloadAccess(clang::Sema &S,
   visitor.diagnose(TU);
   visitor.diagnose(TU);
 }
 }
 
 
-} // namespace hlsl
+} // namespace hlsl