[clang] [llvm] [HLSL] Use static create methods to initialize individual resources (PR #156544)

Chris B via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 15 12:03:50 PDT 2025


================
@@ -48,6 +49,14 @@ static FunctionDecl *lookupBuiltinFunction(Sema &S, StringRef Name) {
          "Since this is a builtin it should always resolve!");
   return cast<FunctionDecl>(R.getFoundDecl());
 }
+
+CXXConstructorDecl *lookupCopyConstructor(QualType ResTy) {
+  assert(ResTy->isRecordType() && "not a CXXRecord type");
+  for (auto *CD : ResTy->getAsCXXRecordDecl()->ctors())
----------------
llvm-beanz wrote:

The more correct way to do this is probably to use `Sema::LookupSpecialMember`. I'm not sure it makes much difference, but that approach does allow for different handling based on overloadable cases.

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


More information about the llvm-commits mailing list