File tree Expand file tree Collapse file tree 2 files changed +4
-13
lines changed
cpp/ql/src/semmle/code/cpp/ir/dataflow/internal Expand file tree Collapse file tree 2 files changed +4
-13
lines changed Original file line number Diff line number Diff line change @@ -28,9 +28,7 @@ private class PrimaryArgumentNode extends ArgumentNode {
2828
2929 PrimaryArgumentNode ( ) { exists ( CallInstruction call | op = call .getAnArgumentOperand ( ) ) }
3030
31- override predicate argumentOf ( DataFlowCall call , int pos ) {
32- op = call .getPositionalOrThisArgumentOperand ( pos )
33- }
31+ override predicate argumentOf ( DataFlowCall call , int pos ) { op = call .getArgumentOperand ( pos ) }
3432
3533 override string toString ( ) {
3634 result = "Argument " + op .( PositionalArgumentOperand ) .getIndex ( )
@@ -109,7 +107,7 @@ class ReturnIndirectionNode extends ReturnNode {
109107
110108 override ReturnKind getKind ( ) {
111109 exists ( int index |
112- primary .isParameterOrThisIndirection ( index ) and
110+ primary .hasIndex ( index ) and
113111 result = TIndirectReturnKind ( index )
114112 )
115113 }
@@ -498,13 +496,6 @@ class DataFlowType = IRType;
498496
499497/** A function call relevant for data flow. */
500498class DataFlowCall extends CallInstruction {
501- /**
502- * Gets the nth argument for this call.
503- *
504- * The range of `n` is from `0` to `getNumberOfArguments() - 1`.
505- */
506- Node getArgument ( int n ) { result .asInstruction ( ) = this .getPositionalArgument ( n ) }
507-
508499 Function getEnclosingCallable ( ) { result = this .getEnclosingFunction ( ) }
509500}
510501
Original file line number Diff line number Diff line change @@ -267,7 +267,7 @@ class ParameterIndirectionNode extends ParameterNode {
267267 override predicate isParameterOf ( Function f , int pos ) {
268268 exists ( int index |
269269 instr .getEnclosingFunction ( ) = f and
270- instr .isParameterOrQualifierIndex ( index )
270+ instr .hasIndex ( index )
271271 |
272272 pos = getArgumentPosOfSideEffect ( index )
273273 )
@@ -474,7 +474,7 @@ class DefinitionByReferenceNode extends InstructionNode {
474474 instr
475475 .getPrimaryInstruction ( )
476476 .( CallInstruction )
477- .getPositionalOrThisArgument ( instr .getIndex ( ) )
477+ .getArgument ( instr .getIndex ( ) )
478478 .getUnconvertedResultExpression ( )
479479 }
480480
You can’t perform that action at this time.
0 commit comments