11/**
2- * DEPRECATED: Use `TypeTracking.qll` or a `DataFlow::Configuration` from `Configuration.qll` instead.
3- *
2+ * DEPRECATED: Use `TypeTracking.qll` instead.
3+ *
4+ * The following `TrackedNode` usage is less expressive than the equivalent type tracking usage below.
5+ *
6+ * ```
7+ * class MyTrackedNode extends TrackedNode {
8+ * MyTrackedNode() { isInteresting(this) }
9+ * }
10+ *
11+ * DataFlow::Node getMyTrackedNodeLocation(MyTrackedNode n) {
12+ * n.flowsTo(result)
13+ * }
14+ * ```
15+ *
16+ * ```
17+ * DataFlow::Node getMyTrackedNodeLocation(DataFlow::Node start, DataFlow::TypeTracker t) {
18+ * t.start() and
19+ * isInteresting(result) and
20+ * result = start
21+ * or
22+ * exists(DataFlow::TypeTracker t2 | t = t2.smallstep(getMyTrackedNodeLocation(start, t2), result))
23+ * }
24+ *
25+ * DataFlow::Node getMyTrackedNodeLocation(DataFlow::Node n) {
26+ * result = getMyTrackedNodeLocation(n, DataFlow::TypeTracker::end())
27+ * }
28+ * ```
29+ *
430 * Provides support for inter-procedural tracking of a customizable
531 * set of data flow nodes.
632 */
@@ -14,7 +40,7 @@ private import internal.FlowSteps as FlowSteps
1440 * To track additional values, extends this class with additional
1541 * subclasses.
1642 */
17- deprecated abstract class TrackedNode extends DataFlow:: Node {
43+ abstract deprecated class TrackedNode extends DataFlow:: Node {
1844 /**
1945 * Holds if this node flows into `sink` in zero or more (possibly
2046 * inter-procedural) steps.
@@ -28,7 +54,7 @@ deprecated abstract class TrackedNode extends DataFlow::Node {
2854 * To track additional expressions, extends this class with additional
2955 * subclasses.
3056 */
31- deprecated abstract class TrackedExpr extends Expr {
57+ abstract deprecated class TrackedExpr extends Expr {
3258 predicate flowsTo ( Expr sink ) {
3359 exists ( TrackedExprNode ten | ten .asExpr ( ) = this | ten .flowsTo ( DataFlow:: valueNode ( sink ) ) )
3460 }
@@ -66,7 +92,9 @@ private module NodeTracking {
6692 *
6793 * Summary steps through function calls are not taken into account.
6894 */
69- deprecated private predicate basicFlowStep ( DataFlow:: Node pred , DataFlow:: Node succ , PathSummary summary ) {
95+ deprecated private predicate basicFlowStep (
96+ DataFlow:: Node pred , DataFlow:: Node succ , PathSummary summary
97+ ) {
7098 isRelevant ( pred ) and
7199 (
72100 // Local flow
@@ -343,7 +371,9 @@ private module NodeTracking {
343371 /**
344372 * Holds if there is a flow step from `pred` to `succ` described by `summary`.
345373 */
346- deprecated private predicate flowStep ( DataFlow:: Node pred , DataFlow:: Node succ , PathSummary summary ) {
374+ deprecated private predicate flowStep (
375+ DataFlow:: Node pred , DataFlow:: Node succ , PathSummary summary
376+ ) {
347377 basicFlowStep ( pred , succ , summary )
348378 or
349379 // Flow through a function that returns a value that depends on one of its arguments
0 commit comments