================
@@ -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
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to