Skip to content

Commit

Permalink
Simplifying k parsing.
Browse files Browse the repository at this point in the history
  • Loading branch information
bdrodes committed Nov 7, 2024
1 parent 934cf4c commit 7498c05
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions cpp/ql/lib/semmle/code/cpp/controlflow/IRGuards.qll
Original file line number Diff line number Diff line change
Expand Up @@ -1371,10 +1371,5 @@ private class IntegerOrPointerConstantInstruction extends ConstantInstruction {

/** The int value of integer constant expression. */
private int int_value(Instruction i) {
// if i is an integer, just grab that value
// if not, then find a derived instruction that is an integer
// recursing through all the GVN assignments
if i instanceof IntegerOrPointerConstantInstruction
then result = i.(IntegerOrPointerConstantInstruction).getValue().toInt()
else result = int_value(getDerivedInstruction(i))
result = valueNumber(i).getAnInstruction().(IntegerOrPointerConstantInstruction).getValue().toInt()
}

0 comments on commit 7498c05

Please sign in to comment.