Skip to content

Commit a927e8a

Browse files
committed
nfc, review: small clean up to reuse function
1 parent a7741fb commit a927e8a

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

clang/lib/Sema/SemaHLSL.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1398,9 +1398,8 @@ bool SemaHLSL::handleRootSignatureElements(
13981398

13991399
// Compute the register bounds and track resource binding
14001400
uint32_t LowerBound(Clause->Reg.Number);
1401-
uint32_t UpperBound = Clause->NumDescriptors == ~0u
1402-
? ~0u
1403-
: LowerBound + Clause->NumDescriptors - 1;
1401+
uint32_t UpperBound = llvm::hlsl::rootsig::computeRangeBound(
1402+
LowerBound, Clause->NumDescriptors);
14041403

14051404
BindingChecker.trackBinding(
14061405
Table->Visibility,

0 commit comments

Comments
 (0)