File tree Expand file tree Collapse file tree 3 files changed +3
-21
lines changed
cpp/ql/src/semmle/code/cpp/ir/implementation Expand file tree Collapse file tree 3 files changed +3
-21
lines changed Original file line number Diff line number Diff line change @@ -6,13 +6,7 @@ language[monotonicAggregates]
66int getConstantValue ( Instruction instr ) {
77 result = instr .( IntegerConstantInstruction ) .getValue ( ) .toInt ( ) or
88 result = getBinaryInstructionValue ( instr ) or
9- exists ( UnaryInstruction unaryInstr , int src |
10- unaryInstr = instr and
11- src = getConstantValue ( unaryInstr .getOperand ( ) ) and
12- (
13- unaryInstr instanceof NegateInstruction and result = neg ( src )
14- )
15- ) or
9+ result = neg ( getConstantValue ( instr .( NegateInstruction ) .getOperand ( ) ) ) or
1610 result = getConstantValue ( instr .( CopyInstruction ) .getSourceValue ( ) ) or
1711 exists ( PhiInstruction phi |
1812 phi = instr and
Original file line number Diff line number Diff line change @@ -6,13 +6,7 @@ language[monotonicAggregates]
66int getConstantValue ( Instruction instr ) {
77 result = instr .( IntegerConstantInstruction ) .getValue ( ) .toInt ( ) or
88 result = getBinaryInstructionValue ( instr ) or
9- exists ( UnaryInstruction unaryInstr , int src |
10- unaryInstr = instr and
11- src = getConstantValue ( unaryInstr .getOperand ( ) ) and
12- (
13- unaryInstr instanceof NegateInstruction and result = neg ( src )
14- )
15- ) or
9+ result = neg ( getConstantValue ( instr .( NegateInstruction ) .getOperand ( ) ) ) or
1610 result = getConstantValue ( instr .( CopyInstruction ) .getSourceValue ( ) ) or
1711 exists ( PhiInstruction phi |
1812 phi = instr and
Original file line number Diff line number Diff line change @@ -6,13 +6,7 @@ language[monotonicAggregates]
66int getConstantValue ( Instruction instr ) {
77 result = instr .( IntegerConstantInstruction ) .getValue ( ) .toInt ( ) or
88 result = getBinaryInstructionValue ( instr ) or
9- exists ( UnaryInstruction unaryInstr , int src |
10- unaryInstr = instr and
11- src = getConstantValue ( unaryInstr .getOperand ( ) ) and
12- (
13- unaryInstr instanceof NegateInstruction and result = neg ( src )
14- )
15- ) or
9+ result = neg ( getConstantValue ( instr .( NegateInstruction ) .getOperand ( ) ) ) or
1610 result = getConstantValue ( instr .( CopyInstruction ) .getSourceValue ( ) ) or
1711 exists ( PhiInstruction phi |
1812 phi = instr and
You can’t perform that action at this time.
0 commit comments