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

Helena Kotas via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 15 17:05:09 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())
----------------
hekota wrote:

Unfortunately, we can't use the `Sema::LookupSpecialMember` here because it requires a complete type, and we are just now building & completing the type (which requires a call to the copy constructor).

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


More information about the llvm-commits mailing list