Skip to content

Commit 5f67a34

Browse files
shafikgithub-actions[bot]
authored andcommitted
Automerge: [HLSL][NFC] Fix range check in verifyRegisterSpace (#152615)
Static analysis flagged the second part of this range check as always true. RegisterSpace is uint32_t therefore the max value is 0xFFFFFFFF and so the first check is sufficient.
2 parents 7353d1b + 51bc0c1 commit 5f67a34

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/lib/Frontend/HLSL/RootSignatureValidations.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ bool verifyRegisterValue(uint32_t RegisterValue) {
2929
// This Range is reserverved, therefore invalid, according to the spec
3030
// https://github.com/llvm/wg-hlsl/blob/main/proposals/0002-root-signature-in-clang.md#all-the-values-should-be-legal
3131
bool verifyRegisterSpace(uint32_t RegisterSpace) {
32-
return !(RegisterSpace >= 0xFFFFFFF0 && RegisterSpace <= 0xFFFFFFFF);
32+
return !(RegisterSpace >= 0xFFFFFFF0);
3333
}
3434

3535
bool verifyRootDescriptorFlag(uint32_t Version, uint32_t FlagsVal) {

0 commit comments

Comments
 (0)