Skip to content

Commit 5eeb7e3

Browse files
committed
cpp: rollback dataflow deprecetes
1 parent e1fadd3 commit 5eeb7e3

File tree

4 files changed

+53
-0
lines changed

4 files changed

+53
-0
lines changed

cpp/ql/lib/semmle/code/cpp/dataflow/DataFlow.qll

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,16 @@
1818
*/
1919

2020
import cpp
21+
22+
/**
23+
* DEPRECATED: Use `semmle.code.cpp.dataflow.new.DataFlow` instead.
24+
*
25+
* Provides classes for performing local (intra-procedural) and
26+
* global (inter-procedural) data flow analyses.
27+
*/
28+
deprecated module DataFlow {
29+
private import semmle.code.cpp.dataflow.internal.DataFlowImplSpecific
30+
private import codeql.dataflow.DataFlow
31+
import DataFlowMake<Location, CppOldDataFlow>
32+
import Public
33+
}

cpp/ql/lib/semmle/code/cpp/dataflow/TaintTracking.qll

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,17 @@
1616
*/
1717

1818
import semmle.code.cpp.dataflow.DataFlow
19+
20+
/**
21+
* DEPRECATED: Use `semmle.code.cpp.dataflow.new.TaintTracking` instead.
22+
*
23+
* Provides classes for performing local (intra-procedural) and
24+
* global (inter-procedural) taint-tracking analyses.
25+
*/
26+
deprecated module TaintTracking {
27+
import semmle.code.cpp.dataflow.internal.TaintTrackingUtil
28+
private import semmle.code.cpp.dataflow.internal.DataFlowImplSpecific
29+
private import semmle.code.cpp.dataflow.internal.TaintTrackingImplSpecific
30+
private import codeql.dataflow.TaintTracking
31+
import TaintFlowMake<Location, CppOldDataFlow, CppOldTaintTracking>
32+
}

cpp/ql/lib/semmle/code/cpp/dataflow/internal/DataFlowUtil.qll

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,19 @@ class Node extends TNode {
9898
/** Gets the location of this element. */
9999
Location getLocation() { none() } // overridden by subclasses
100100

101+
/**
102+
* Holds if this element is at the specified location.
103+
* The location spans column `startcolumn` of line `startline` to
104+
* column `endcolumn` of line `endline` in file `filepath`.
105+
* For more information, see
106+
* [Locations](https://codeql.github.com/docs/writing-codeql-queries/providing-locations-in-codeql-queries/).
107+
*/
108+
deprecated predicate hasLocationInfo(
109+
string filepath, int startline, int startcolumn, int endline, int endcolumn
110+
) {
111+
this.getLocation().hasLocationInfo(filepath, startline, startcolumn, endline, endcolumn)
112+
}
113+
101114
/**
102115
* Gets an upper bound on the type of this node.
103116
*/

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

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -538,6 +538,19 @@ class Node extends TIRDataFlowNode {
538538
none() // overridden by subclasses
539539
}
540540

541+
/**
542+
* Holds if this element is at the specified location.
543+
* The location spans column `startcolumn` of line `startline` to
544+
* column `endcolumn` of line `endline` in file `filepath`.
545+
* For more information, see
546+
* [Locations](https://codeql.github.com/docs/writing-codeql-queries/providing-locations-in-codeql-queries/).
547+
*/
548+
deprecated predicate hasLocationInfo(
549+
string filepath, int startline, int startcolumn, int endline, int endcolumn
550+
) {
551+
this.getLocation().hasLocationInfo(filepath, startline, startcolumn, endline, endcolumn)
552+
}
553+
541554
/** Gets a textual representation of this element. */
542555
cached
543556
final string toString() {

0 commit comments

Comments
 (0)