[clang] [HLSL][Sema] Validate that occupied register numbers never exceed UINT32_MAX (PR #174028)
Tex Riddell via cfe-commits
cfe-commits at lists.llvm.org
Tue Jan 6 11:06:28 PST 2026
================
@@ -2361,6 +2361,94 @@ static bool DiagnoseHLSLRegisterAttribute(Sema &S, SourceLocation &ArgLoc,
return ValidateMultipleRegisterAnnotations(S, D, RegType);
}
+// return false if the slot count exceeds the limit, true otherwise
+static bool AccumulateHLSLResourceSlots(QualType Ty, uint64_t &SlotCount,
+ const uint64_t &Limit, ASTContext &Ctx,
+ uint64_t Multiplier = 1) {
----------------
tex3d wrote:
It seems to me that `SlotCount` is really like `StartSlot`, and `Multiplier` is really like `ArrayCount`.
https://github.com/llvm/llvm-project/pull/174028
More information about the cfe-commits
mailing list