[clang] Implement `ByteAddressBuffer` Load/Store methods (PR #176058)

Helena Kotas via cfe-commits cfe-commits at lists.llvm.org
Thu Jan 15 14:53:22 PST 2026


================
@@ -3308,9 +3308,27 @@ bool SemaHLSL::CheckBuiltinFunctionCall(unsigned BuiltinID, CallExpr *TheCall) {
 
     auto *ResourceTy =
         TheCall->getArg(0)->getType()->castAs<HLSLAttributedResourceType>();
-    QualType ContainedTy = ResourceTy->getContainedType();
+    QualType ElementTy = ResourceTy->getContainedType();
+    // ByteAddressBuffer uses the FunctionDecl types instead of the contained
+    // type
----------------
hekota wrote:

```suggestion
    // Figure out the return type of the resource_getpointer intrinsic.
    // For most resources it is the contained type. For ByteAddressBuffer
    // it is determined by the type used on the FunctionDecl.

```

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


More information about the cfe-commits mailing list