Commit e5d9644
authored
[NFC] [DirectX] Fix warning about parentheses for assertion in DXContainerGlobals.cpp (llvm#166231)
This PR fixes the appearance of the following warning message when
building LLVM with clang (21.1.2)
```
[48/100] Building CXX object lib/Target/DirectX/CMakeFiles/LLVMDirectXCodeGen.dir/DXContainerGlobals.cpp.o
In file included from /nix/store/ffrg0560kj0066s4k9pznjand907nlnz-gcc-14.3.0/include/c++/14.3.0/cassert:44,
from /workspace/llvm-project/llvm/include/llvm/Support/Endian.h:19,
from /workspace/llvm-project/llvm/include/llvm/Support/MD5.h:33,
from /workspace/llvm-project/llvm/lib/Target/DirectX/DXContainerGlobals.cpp:28:
/workspace/llvm-project/llvm/lib/Target/DirectX/DXContainerGlobals.cpp: In lambda function:
/workspace/llvm-project/llvm/lib/Target/DirectX/DXContainerGlobals.cpp:198:78: warning: suggest parentheses around ‘&&’ within ‘||’ [-Wparentheses]
198 | (uint64_t)Binding.LowerBound + Binding.Size - 1 <= UINT32_MAX &&
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~
199 | "Resource range is too large");
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
I marked this PR as an NFC because it only modifies an assertion condition to remove a compiler warning.1 parent 9ff31be commit e5d9644
1 file changed
+4
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
194 | 194 | | |
195 | 195 | | |
196 | 196 | | |
197 | | - | |
198 | | - | |
199 | | - | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
200 | 201 | | |
201 | 202 | | |
202 | 203 | | |
| |||
0 commit comments