Skip to content

Commit 5476008

Browse files
committed
add pointers to the qldoc of deprecated predicates
1 parent 8f86b06 commit 5476008

File tree

3 files changed

+12
-2
lines changed

3 files changed

+12
-2
lines changed

javascript/ql/lib/semmle/javascript/DefUse.qll

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,6 +265,7 @@ predicate definitionReaches(Variable v, VarDef def, VarUse use) {
265265
/**
266266
* Holds if the definition of local variable `v` in `def` reaches `use` along some control flow path
267267
* without crossing another definition of `v`.
268+
* DEPRECATED: Use the `SSA.qll` library instead.
268269
*/
269270
deprecated predicate localDefinitionReaches(LocalVariable v, VarDef def, VarUse use) {
270271
exists(SsaExplicitDefinition ssa |
@@ -273,7 +274,10 @@ deprecated predicate localDefinitionReaches(LocalVariable v, VarDef def, VarUse
273274
)
274275
}
275276

276-
/** Holds if `nd` is a pseudo-definition and the result is one of its inputs. */
277+
/**
278+
* Holds if `nd` is a pseudo-definition and the result is one of its inputs.
279+
* DEPRECATED: Use the `SSA.qll` library instead.
280+
*/
277281
deprecated private SsaDefinition getAPseudoDefinitionInput(SsaDefinition nd) {
278282
result = nd.(SsaPseudoDefinition).getAnInput()
279283
}
@@ -296,6 +300,7 @@ private int nextDefAfter(BasicBlock bb, Variable v, int i, VarDef d) {
296300
*
297301
* This is the case if there is a path from `earlier` to `later` that does not cross
298302
* another definition of `v`.
303+
* DEPRECATED: Use the `SSA.qll` library instead.
299304
*/
300305
deprecated predicate localDefinitionOverwrites(LocalVariable v, VarDef earlier, VarDef later) {
301306
exists(BasicBlock bb, int i, int next | next = nextDefAfter(bb, v, i, earlier) |

javascript/ql/lib/semmle/javascript/dataflow/TaintTracking.qll

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -429,6 +429,7 @@ module TaintTracking {
429429

430430
/**
431431
* Holds if `pred -> succ` is a taint propagating data flow edge through a string operation.
432+
* DEPRECATED: Use `stringConcatenationStep` and `stringManipulationStep` instead.
432433
*/
433434
pragma[inline]
434435
deprecated predicate stringStep(DataFlow::Node pred, DataFlow::Node succ) {
@@ -1242,6 +1243,7 @@ module TaintTracking {
12421243

12431244
/**
12441245
* Holds if taint propagates from `pred` to `succ` in one local (intra-procedural) step.
1246+
* DEPRECATED: Use `TaintTracking::sharedTaintStep` and `DataFlow::Node::getALocalSource()` instead.
12451247
*/
12461248
deprecated predicate localTaintStep(DataFlow::Node pred, DataFlow::Node succ) {
12471249
DataFlow::localFlowStep(pred, succ) or

javascript/ql/src/Declarations/Definitions.qll

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
import javascript
22

3-
/** DEPRECATED: An identifier appearing in a defining position. */
3+
/**
4+
* DEPRECATED: Use `SsaDefinition` from `SSA.qll` instead.
5+
* An identifier appearing in a defining position.
6+
*/
47
deprecated class DefiningIdentifier extends Identifier {
58
DefiningIdentifier() {
69
this instanceof VarDecl or

0 commit comments

Comments
 (0)