[clang] [HLSL][TableGen] Add `__hlsl_resource_t` to known built-in function types (PR #163465)
Justin Bogner via cfe-commits
cfe-commits at lists.llvm.org
Wed Nov 19 11:52:49 PST 2025
================
@@ -3047,54 +3047,29 @@ bool SemaHLSL::CheckBuiltinFunctionCall(unsigned BuiltinID, CallExpr *TheCall) {
break;
}
case Builtin::BI__builtin_hlsl_resource_uninitializedhandle: {
- if (SemaRef.checkArgCount(TheCall, 1) ||
- CheckResourceHandle(&SemaRef, TheCall, 0))
- return true;
+ assert(TheCall->getNumArgs() == 1 && "expected 1 arg");
// use the type of the handle (arg0) as a return type
----------------
bogner wrote:
Should we update this and the other similar comments to point out that what's happening here is that we're updating the return type to one whose attributes match that of the argument? As it's worded now is a bit confusing, because the return type is already a resource type, just not an attributed one.
https://github.com/llvm/llvm-project/pull/163465
More information about the cfe-commits
mailing list