Skip to content

Commit 36373fc

Browse files
committed
C++: Deprecate DataFlow::definitionByReferenceNode
This predicate name was only used in IR data flow, not in AST data flow.
1 parent 3f38378 commit 36373fc

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

cpp/ql/src/semmle/code/cpp/ir/dataflow/DefaultTaintTracking.qll

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ private DataFlow::Node getNodeForSource(Expr source) {
7070
//
7171
// This case goes together with the similar (but not identical) rule in
7272
// `nodeIsBarrierIn`.
73-
result = DataFlow::definitionByReferenceNode(source) and
73+
result = DataFlow::definitionByReferenceNodeFromArgument(source) and
7474
not argv(source.(VariableAccess).getTarget())
7575
)
7676
}
@@ -210,7 +210,7 @@ private predicate nodeIsBarrierIn(DataFlow::Node node) {
210210
or
211211
// This case goes together with the similar (but not identical) rule in
212212
// `getNodeForSource`.
213-
node = DataFlow::definitionByReferenceNode(source)
213+
node = DataFlow::definitionByReferenceNodeFromArgument(source)
214214
)
215215
}
216216

cpp/ql/src/semmle/code/cpp/ir/dataflow/internal/DataFlowUtil.qll

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -473,10 +473,12 @@ class VariableNode extends Node, TVariableNode {
473473
InstructionNode instructionNode(Instruction instr) { result.getInstruction() = instr }
474474

475475
/**
476+
* DEPRECATED: use `definitionByReferenceNodeFromArgument` instead.
477+
*
476478
* Gets the `Node` corresponding to a definition by reference of the variable
477479
* that is passed as `argument` of a call.
478480
*/
479-
DefinitionByReferenceNode definitionByReferenceNode(Expr e) { result.getArgument() = e }
481+
deprecated DefinitionByReferenceNode definitionByReferenceNode(Expr e) { result.getArgument() = e }
480482

481483
/**
482484
* Gets the `Node` corresponding to the value of evaluating `e` or any of its

0 commit comments

Comments
 (0)