mirror of
https://github.com/github/codeql.git
synced 2026-04-27 01:35:13 +02:00
Merge pull request #17787 from yoff/shared/add-location-to-typetracking-nodes
shared: Add locations to type tracking nodes
This commit is contained in:
@@ -80,7 +80,7 @@ module MakeImplCommon<LocationSig Location, InputSig<Location> Lang> {
|
||||
}
|
||||
}
|
||||
|
||||
private module TypeTrackingInput implements Tt::TypeTrackingInput {
|
||||
private module TypeTrackingInput implements Tt::TypeTrackingInput<Location> {
|
||||
final class Node = Lang::Node;
|
||||
|
||||
class LocalSourceNode extends Node {
|
||||
@@ -145,7 +145,7 @@ module MakeImplCommon<LocationSig Location, InputSig<Location> Lang> {
|
||||
predicate hasFeatureBacktrackStoreTarget() { none() }
|
||||
}
|
||||
|
||||
private module TypeTracking = Tt::TypeTracking<TypeTrackingInput>;
|
||||
private module TypeTracking = Tt::TypeTracking<Location, TypeTrackingInput>;
|
||||
|
||||
/**
|
||||
* The cost limits for the `AccessPathFront` to `AccessPathApprox` expansion.
|
||||
|
||||
@@ -3,14 +3,19 @@
|
||||
* for tracking types.
|
||||
*/
|
||||
|
||||
private import codeql.util.Location
|
||||
|
||||
/**
|
||||
* The step relations for type tracking.
|
||||
*/
|
||||
signature module TypeTrackingInput {
|
||||
signature module TypeTrackingInput<LocationSig Location> {
|
||||
/** A node that is used by the type-trackers. */
|
||||
class Node {
|
||||
/** Gets a textual representation of this node. */
|
||||
string toString();
|
||||
|
||||
/** Gets the source location of this node. */
|
||||
Location getLocation();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -127,8 +132,8 @@ private import internal.TypeTrackingImpl as Impl
|
||||
* Given a set of step relations, this module provides classes and predicates
|
||||
* for simple data-flow reachability suitable for tracking types.
|
||||
*/
|
||||
module TypeTracking<TypeTrackingInput I> {
|
||||
private module MkImpl = Impl::TypeTracking<I>;
|
||||
module TypeTracking<LocationSig Location, TypeTrackingInput<Location> I> {
|
||||
private module MkImpl = Impl::TypeTracking<Location, I>;
|
||||
|
||||
private module ConsistencyChecksInput implements MkImpl::ConsistencyChecksInputSig { }
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
private import codeql.util.Boolean
|
||||
private import codeql.util.Option
|
||||
private import codeql.typetracking.TypeTracking
|
||||
private import codeql.util.Location
|
||||
|
||||
/**
|
||||
* Given a set of step relations, this module provides classes and predicates
|
||||
@@ -14,7 +15,7 @@ private import codeql.typetracking.TypeTracking
|
||||
* The constructed module contains both public and internal logic; the public
|
||||
* interface is exposed via `codeql.typetracking.TypeTracking`.
|
||||
*/
|
||||
module TypeTracking<TypeTrackingInput I> {
|
||||
module TypeTracking<LocationSig Location, TypeTrackingInput<Location> I> {
|
||||
private import I
|
||||
|
||||
signature module ConsistencyChecksInputSig {
|
||||
|
||||
Reference in New Issue
Block a user