JS: Make isAssignedInUniqueFile global, as it should be

This commit is contained in:
Asger F
2025-11-03 10:05:39 +01:00
parent 6498cd1b07
commit 46b1387846

View File

@@ -206,6 +206,7 @@ module AccessPath {
* Holds if the global `accessPath` is only assigned to from one file, not counting * Holds if the global `accessPath` is only assigned to from one file, not counting
* self-assignments. * self-assignments.
*/ */
overlay[global]
predicate isAssignedInUniqueFile(string accessPath) { predicate isAssignedInUniqueFile(string accessPath) {
strictcount(File f | isAssignedInFile(accessPath, f)) = 1 strictcount(File f | isAssignedInFile(accessPath, f)) = 1
} }
@@ -511,7 +512,7 @@ module AccessPath {
/** /**
* Holds if there is a step from `pred` to `succ` through an assignment to an access path. * Holds if there is a step from `pred` to `succ` through an assignment to an access path.
*/ */
overlay[caller] overlay[caller?]
pragma[inline] pragma[inline]
predicate step(DataFlow::Node pred, DataFlow::Node succ) { predicate step(DataFlow::Node pred, DataFlow::Node succ) {
exists(string name, Root root | exists(string name, Root root |