mirror of
https://github.com/github/codeql.git
synced 2025-12-17 01:03:14 +01:00
Shared: allow exclusions to localFlowIsLocal
This commit is contained in:
@@ -74,6 +74,9 @@ signature module InputSig<LocationSig Location, DF::InputSig<Location> DataFlowL
|
|||||||
) {
|
) {
|
||||||
none()
|
none()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** Holds if `(n1, n2)` should be excluded from the consistency test `localFlowIsLocal`. */
|
||||||
|
default predicate localFlowIsLocalExclude(DataFlowLang::Node n1, DataFlowLang::Node n2) { none() }
|
||||||
}
|
}
|
||||||
|
|
||||||
module MakeConsistency<
|
module MakeConsistency<
|
||||||
@@ -169,6 +172,7 @@ module MakeConsistency<
|
|||||||
query predicate localFlowIsLocal(Node n1, Node n2, string msg) {
|
query predicate localFlowIsLocal(Node n1, Node n2, string msg) {
|
||||||
simpleLocalFlowStep(n1, n2, _) and
|
simpleLocalFlowStep(n1, n2, _) and
|
||||||
nodeGetEnclosingCallable(n1) != nodeGetEnclosingCallable(n2) and
|
nodeGetEnclosingCallable(n1) != nodeGetEnclosingCallable(n2) and
|
||||||
|
not Input::localFlowIsLocalExclude(n1, n2) and
|
||||||
msg = "Local flow step does not preserve enclosing callable."
|
msg = "Local flow step does not preserve enclosing callable."
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user