Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 0a4b15d

Browse files
committed
Java/C++/C#: Add nodes predicate to PathGraph.
1 parent 10076a6 commit 0a4b15d

19 files changed

Lines changed: 95 additions & 0 deletions

File tree

cpp/ql/src/semmle/code/cpp/dataflow/internal/DataFlowImpl.qll

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1647,6 +1647,11 @@ private predicate pathSuccPlus(PathNode n1, PathNode n2) = fastTC(pathSucc/2)(n1
16471647
module PathGraph {
16481648
/** Holds if `(a,b)` is an edge in the graph of data flow path explanations. */
16491649
query predicate edges(PathNode a, PathNode b) { pathSucc(a, b) }
1650+
1651+
/** Holds if `n` is a node in the graph of data flow path explanations. */
1652+
query predicate nodes(PathNode n, string key, string val) {
1653+
reach(n) and key = "semmle.label" and val = n.toString()
1654+
}
16501655
}
16511656

16521657
/**

cpp/ql/src/semmle/code/cpp/dataflow/internal/DataFlowImpl2.qll

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1647,6 +1647,11 @@ private predicate pathSuccPlus(PathNode n1, PathNode n2) = fastTC(pathSucc/2)(n1
16471647
module PathGraph {
16481648
/** Holds if `(a,b)` is an edge in the graph of data flow path explanations. */
16491649
query predicate edges(PathNode a, PathNode b) { pathSucc(a, b) }
1650+
1651+
/** Holds if `n` is a node in the graph of data flow path explanations. */
1652+
query predicate nodes(PathNode n, string key, string val) {
1653+
reach(n) and key = "semmle.label" and val = n.toString()
1654+
}
16501655
}
16511656

16521657
/**

cpp/ql/src/semmle/code/cpp/dataflow/internal/DataFlowImpl3.qll

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1647,6 +1647,11 @@ private predicate pathSuccPlus(PathNode n1, PathNode n2) = fastTC(pathSucc/2)(n1
16471647
module PathGraph {
16481648
/** Holds if `(a,b)` is an edge in the graph of data flow path explanations. */
16491649
query predicate edges(PathNode a, PathNode b) { pathSucc(a, b) }
1650+
1651+
/** Holds if `n` is a node in the graph of data flow path explanations. */
1652+
query predicate nodes(PathNode n, string key, string val) {
1653+
reach(n) and key = "semmle.label" and val = n.toString()
1654+
}
16501655
}
16511656

16521657
/**

cpp/ql/src/semmle/code/cpp/dataflow/internal/DataFlowImpl4.qll

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1647,6 +1647,11 @@ private predicate pathSuccPlus(PathNode n1, PathNode n2) = fastTC(pathSucc/2)(n1
16471647
module PathGraph {
16481648
/** Holds if `(a,b)` is an edge in the graph of data flow path explanations. */
16491649
query predicate edges(PathNode a, PathNode b) { pathSucc(a, b) }
1650+
1651+
/** Holds if `n` is a node in the graph of data flow path explanations. */
1652+
query predicate nodes(PathNode n, string key, string val) {
1653+
reach(n) and key = "semmle.label" and val = n.toString()
1654+
}
16501655
}
16511656

16521657
/**

cpp/ql/src/semmle/code/cpp/dataflow/internal/DataFlowImplLocal.qll

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1647,6 +1647,11 @@ private predicate pathSuccPlus(PathNode n1, PathNode n2) = fastTC(pathSucc/2)(n1
16471647
module PathGraph {
16481648
/** Holds if `(a,b)` is an edge in the graph of data flow path explanations. */
16491649
query predicate edges(PathNode a, PathNode b) { pathSucc(a, b) }
1650+
1651+
/** Holds if `n` is a node in the graph of data flow path explanations. */
1652+
query predicate nodes(PathNode n, string key, string val) {
1653+
reach(n) and key = "semmle.label" and val = n.toString()
1654+
}
16501655
}
16511656

16521657
/**

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1647,6 +1647,11 @@ private predicate pathSuccPlus(PathNode n1, PathNode n2) = fastTC(pathSucc/2)(n1
16471647
module PathGraph {
16481648
/** Holds if `(a,b)` is an edge in the graph of data flow path explanations. */
16491649
query predicate edges(PathNode a, PathNode b) { pathSucc(a, b) }
1650+
1651+
/** Holds if `n` is a node in the graph of data flow path explanations. */
1652+
query predicate nodes(PathNode n, string key, string val) {
1653+
reach(n) and key = "semmle.label" and val = n.toString()
1654+
}
16501655
}
16511656

16521657
/**

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1647,6 +1647,11 @@ private predicate pathSuccPlus(PathNode n1, PathNode n2) = fastTC(pathSucc/2)(n1
16471647
module PathGraph {
16481648
/** Holds if `(a,b)` is an edge in the graph of data flow path explanations. */
16491649
query predicate edges(PathNode a, PathNode b) { pathSucc(a, b) }
1650+
1651+
/** Holds if `n` is a node in the graph of data flow path explanations. */
1652+
query predicate nodes(PathNode n, string key, string val) {
1653+
reach(n) and key = "semmle.label" and val = n.toString()
1654+
}
16501655
}
16511656

16521657
/**

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1647,6 +1647,11 @@ private predicate pathSuccPlus(PathNode n1, PathNode n2) = fastTC(pathSucc/2)(n1
16471647
module PathGraph {
16481648
/** Holds if `(a,b)` is an edge in the graph of data flow path explanations. */
16491649
query predicate edges(PathNode a, PathNode b) { pathSucc(a, b) }
1650+
1651+
/** Holds if `n` is a node in the graph of data flow path explanations. */
1652+
query predicate nodes(PathNode n, string key, string val) {
1653+
reach(n) and key = "semmle.label" and val = n.toString()
1654+
}
16501655
}
16511656

16521657
/**

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1647,6 +1647,11 @@ private predicate pathSuccPlus(PathNode n1, PathNode n2) = fastTC(pathSucc/2)(n1
16471647
module PathGraph {
16481648
/** Holds if `(a,b)` is an edge in the graph of data flow path explanations. */
16491649
query predicate edges(PathNode a, PathNode b) { pathSucc(a, b) }
1650+
1651+
/** Holds if `n` is a node in the graph of data flow path explanations. */
1652+
query predicate nodes(PathNode n, string key, string val) {
1653+
reach(n) and key = "semmle.label" and val = n.toString()
1654+
}
16501655
}
16511656

16521657
/**

csharp/ql/src/semmle/code/csharp/dataflow/internal/DataFlowImpl.qll

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1647,6 +1647,11 @@ private predicate pathSuccPlus(PathNode n1, PathNode n2) = fastTC(pathSucc/2)(n1
16471647
module PathGraph {
16481648
/** Holds if `(a,b)` is an edge in the graph of data flow path explanations. */
16491649
query predicate edges(PathNode a, PathNode b) { pathSucc(a, b) }
1650+
1651+
/** Holds if `n` is a node in the graph of data flow path explanations. */
1652+
query predicate nodes(PathNode n, string key, string val) {
1653+
reach(n) and key = "semmle.label" and val = n.toString()
1654+
}
16501655
}
16511656

16521657
/**

0 commit comments

Comments
 (0)