Skip to content

Commit c46c662

Browse files
committed
Python: LocalSources.qll annotations
1 parent df0f2f8 commit c46c662

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

python/ql/lib/semmle/python/dataflow/new/internal/LocalSources.qll

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
* Note that unlike `TypeTracker.qll`, this library only performs
66
* local tracking within a function.
77
*/
8+
overlay[local]
9+
module;
810

911
private import python
1012
import DataFlowPublic
@@ -77,6 +79,7 @@ class LocalSourceNode extends Node {
7779
}
7880

7981
/** Holds if this `LocalSourceNode` can flow to `nodeTo` in one or more local flow steps. */
82+
overlay[caller]
8083
pragma[inline]
8184
predicate flowsTo(Node nodeTo) { Cached::hasLocalSource(nodeTo, this) }
8285

@@ -149,6 +152,7 @@ class LocalSourceNode extends Node {
149152
*
150153
* See `TypeTracker` for more details about how to use this.
151154
*/
155+
overlay[global]
152156
pragma[inline]
153157
LocalSourceNode track(TypeTracker t2, TypeTracker t) { t = t2.step(this, result) }
154158

@@ -157,6 +161,7 @@ class LocalSourceNode extends Node {
157161
*
158162
* See `TypeBackTracker` for more details about how to use this.
159163
*/
164+
overlay[global]
160165
pragma[inline]
161166
LocalSourceNode backtrack(TypeBackTracker t2, TypeBackTracker t) { t = t2.step(result, this) }
162167
}
@@ -210,6 +215,7 @@ private module FutureWork {
210215
*
211216
* See `TypeTracker` for more details about how to use this.
212217
*/
218+
overlay[global]
213219
pragma[inline]
214220
TypeTrackingNode track(TypeTracker t2, TypeTracker t) { t = t2.step(this, result) }
215221

@@ -218,6 +224,7 @@ private module FutureWork {
218224
*
219225
* See `TypeBackTracker` for more details about how to use this.
220226
*/
227+
overlay[global]
221228
pragma[inline]
222229
TypeTrackingNode backtrack(TypeBackTracker t2, TypeBackTracker t) { t2 = t.step(result, this) }
223230
}

0 commit comments

Comments
 (0)