Skip to content

Commit 886ab3c

Browse files
committed
add comment
1 parent 152471e commit 886ab3c

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

clang/lib/CodeGen/CGHLSLRuntime.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -958,6 +958,9 @@ std::optional<LValue> CGHLSLRuntime::emitResourceArraySubscriptExpr(
958958
ArrayDecl->getName(), RBA, VkBinding, Args);
959959

960960
if (!CreateMethod)
961+
// This can happen if someone creates an array of structs that looks like
962+
// an HLSL resource record array but it does not have the required static
963+
// create method. No binding will be generated for it.
961964
return std::nullopt;
962965

963966
callResourceInitMethod(CGF, CreateMethod, Args, ValueSlot.getAddress());

0 commit comments

Comments
 (0)