[clang] counter var3 (PR #162291)

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


================
@@ -3815,19 +3860,35 @@ bool SemaHLSL::initGlobalResourceDecl(VarDecl *VD) {
   CXXMethodDecl *CreateMethod = nullptr;
   llvm::SmallVector<Expr *> Args;
 
+  bool HasCounter = hasCounterHandle(ResourceDecl);
+  std::string CreateMethodName;
----------------
hekota wrote:

```suggestion
  const char *CreateMethodName;
```
Using `const char *` will prevent allocation and copying of the string.

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


More information about the cfe-commits mailing list