Skip to content

Commit 4d97534

Browse files
committed
C++: Deprecate LocalScopeVariableReachability
1 parent 1498499 commit 4d97534

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

cpp/ql/src/semmle/code/cpp/controlflow/LocalScopeVariableReachability.qll

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
1+
/**
2+
* DEPRECATED: Use `StackVariableReachability` instead.
3+
*/
4+
15
import cpp
26

37
/**
8+
* DEPRECATED: Use `StackVariableReachability` instead.
9+
*
410
* A reachability analysis for control-flow nodes involving stack variables.
511
* This defines sources, sinks, and any other configurable aspect of the
612
* analysis. Multiple analyses can coexist. To create an analysis, extend this
@@ -18,7 +24,7 @@ import cpp
1824
* Then, to query whether there is flow between some source and sink, call the
1925
* `reaches` predicate on an instance of `MyAnalysisConfiguration`.
2026
*/
21-
abstract class LocalScopeVariableReachability extends string {
27+
abstract deprecated class LocalScopeVariableReachability extends string {
2228
bindingset[this]
2329
LocalScopeVariableReachability() { length() >= 0 }
2430

@@ -207,6 +213,8 @@ predicate bbSuccessorEntryReachesLoopInvariant(
207213
}
208214

209215
/**
216+
* DEPRECATED: Use `StackVariableReachabilityWithReassignment` instead.
217+
*
210218
* Reachability analysis for control-flow nodes involving stack variables.
211219
* Unlike `LocalScopeVariableReachability`, this analysis takes variable
212220
* reassignments into account.
@@ -216,7 +224,7 @@ predicate bbSuccessorEntryReachesLoopInvariant(
216224
* `isSource` and `isSink`, and that there is a `reachesTo` predicate in
217225
* addition to `reaches`.
218226
*/
219-
abstract class LocalScopeVariableReachabilityWithReassignment extends LocalScopeVariableReachability {
227+
abstract deprecated class LocalScopeVariableReachabilityWithReassignment extends LocalScopeVariableReachability {
220228
bindingset[this]
221229
LocalScopeVariableReachabilityWithReassignment() { length() >= 0 }
222230

@@ -314,12 +322,14 @@ abstract class LocalScopeVariableReachabilityWithReassignment extends LocalScope
314322
}
315323

316324
/**
325+
* DEPRECATED: Use `StackVariableReachabilityExt` instead.
326+
*
317327
* Same as `LocalScopeVariableReachability`, but `isBarrier` works on control-flow
318328
* edges rather than nodes and is therefore parameterized by the original
319329
* source node as well. Otherwise, this class is used like
320330
* `LocalScopeVariableReachability`.
321331
*/
322-
abstract class LocalScopeVariableReachabilityExt extends string {
332+
abstract deprecated class LocalScopeVariableReachabilityExt extends string {
323333
bindingset[this]
324334
LocalScopeVariableReachabilityExt() { length() >= 0 }
325335

0 commit comments

Comments
 (0)