================
@@ -650,7 +650,10 @@ class DiagnoseHLSLAvailability
   bool HasMatchingEnvironmentOrNone(const AvailabilityAttr *AA);
 
 public:
-  DiagnoseHLSLAvailability(Sema &SemaRef) : SemaRef(SemaRef) {}
+  DiagnoseHLSLAvailability(Sema &SemaRef)
+      : SemaRef(SemaRef),
+        CurrentShaderEnvironment(llvm::Triple::UnknownEnvironment),
----------------
hekota wrote:

Right, but this is just the default initialization, these values are not used. 
They get updated in `SetShaderStageContext` or `SetShaderStageContext` before 
any analysis is done. This environment value will also be changing when for 
libraries libraries depending on which entry point is getting scanned.

https://github.com/llvm/llvm-project/pull/100778
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to