mirror of
https://github.com/github/codeql.git
synced 2026-04-29 18:55:14 +02:00
Dataflow: Add support for flow state.
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -3,6 +3,25 @@ private import DataFlowImplSpecific::Public
|
||||
import Cached
|
||||
|
||||
module DataFlowImplCommonPublic {
|
||||
/** A state value to track during data flow. */
|
||||
abstract class FlowState extends string {
|
||||
bindingset[this]
|
||||
FlowState() { any() }
|
||||
}
|
||||
|
||||
/**
|
||||
* The default state, which is used when the state is unspecified for a source
|
||||
* or a sink.
|
||||
*/
|
||||
class FlowStateEmpty extends FlowState {
|
||||
FlowStateEmpty() { this = "" }
|
||||
}
|
||||
|
||||
// Dummy value to avoid misoptimizations when FlowState has size 1.
|
||||
private class FlowStateDummy extends FlowState {
|
||||
FlowStateDummy() { this = "dummy" }
|
||||
}
|
||||
|
||||
private newtype TFlowFeature =
|
||||
TFeatureHasSourceCallContext() or
|
||||
TFeatureHasSinkCallContext() or
|
||||
|
||||
Reference in New Issue
Block a user