JS: Move some predicates into NameResolution

This commit is contained in:
Asger F
2025-06-04 12:26:00 +02:00
parent a9169dc126
commit 1ca6e73fd9
2 changed files with 4 additions and 4 deletions

View File

@@ -408,6 +408,10 @@ module NameResolution {
*/ */
predicate trackModule = ValueFlow::TrackNode<ModuleLike>::track/1; predicate trackModule = ValueFlow::TrackNode<ModuleLike>::track/1;
predicate trackClassValue = ValueFlow::TrackNode<ClassDefinition>::track/1;
predicate trackFunctionValue = ValueFlow::TrackNode<Function>::track/1;
/** /**
* Holds if `moduleName` appears to start with a package name, as opposed to a relative file import. * Holds if `moduleName` appears to start with a package name, as opposed to a relative file import.
*/ */

View File

@@ -4,8 +4,6 @@ private import semmle.javascript.internal.UnderlyingTypes
private import semmle.javascript.dataflow.internal.sharedlib.SummaryTypeTracker as SummaryTypeTracker private import semmle.javascript.dataflow.internal.sharedlib.SummaryTypeTracker as SummaryTypeTracker
module TypeResolution { module TypeResolution {
predicate trackClassValue = ValueFlow::TrackNode<ClassDefinition>::track/1;
predicate trackType = TypeFlow::TrackNode<TypeDefinition>::track/1; predicate trackType = TypeFlow::TrackNode<TypeDefinition>::track/1;
/** /**
@@ -24,8 +22,6 @@ module TypeResolution {
) )
} }
predicate trackFunctionValue = ValueFlow::TrackNode<Function>::track/1;
/** /**
* Gets the representative for the type containing the given member. * Gets the representative for the type containing the given member.
* *