mirror of
https://github.com/github/codeql.git
synced 2026-04-24 00:05:14 +02:00
C++: No need to check if the offset is non-negative. It always is because of 'defBlock.getInstruction(oldOffset)' has a result.
This commit is contained in:
@@ -712,10 +712,7 @@ module DefUse {
|
||||
OldBlock defBlock, int defOffset, Alias::MemoryLocation defLocation,
|
||||
Alias::MemoryLocation actualDefLocation
|
||||
) {
|
||||
exists(OldInstruction oldInstr, int oldOffset |
|
||||
oldInstr = defBlock.getInstruction(oldOffset) and
|
||||
oldOffset >= 0
|
||||
|
|
||||
exists(OldInstruction oldInstr, int oldOffset | oldInstr = defBlock.getInstruction(oldOffset) |
|
||||
// An odd offset corresponds to the `Chi` instruction.
|
||||
defOffset = getChiOffset(oldOffset, defBlock) and
|
||||
result = getChi(oldInstr) and
|
||||
|
||||
Reference in New Issue
Block a user