[clang] counter var3 (PR #162291)

Helena Kotas via cfe-commits cfe-commits at lists.llvm.org
Tue Oct 7 16:13:42 PDT 2025


================
@@ -3866,6 +3921,15 @@ bool SemaHLSL::initGlobalResourceDecl(VarDecl *VD) {
       Name, nullptr, VK_PRValue, FPOptionsOverride());
   Args.push_back(NameCast);
 
+  if (HasCounter) {
+    // Will this be in the correct order?
----------------
hekota wrote:

Yes, it will be in the correct order. `initGlobalResourceDecl` is called from `ActOnUninitializedVarDecl`, which follows shortly after 'ActOnVariableDeclarator`. There should not be any other declarations processed in-between these two calls.

https://github.com/llvm/llvm-project/pull/162291


More information about the cfe-commits mailing list