mirror of
https://github.com/github/codeql.git
synced 2026-04-23 15:55:18 +02:00
Dataflow: Simplify branch and join.
This commit is contained in:
@@ -1156,12 +1156,11 @@ module MakeImpl<LocationSig Location, InputSig<Location> Lang> {
|
||||
* contexts.
|
||||
*/
|
||||
pragma[nomagic]
|
||||
private int branch(NodeEx n1) {
|
||||
private int branch(ArgNodeEx n1) {
|
||||
result =
|
||||
strictcount(DataFlowCallable c |
|
||||
exists(NodeEx n |
|
||||
flowOutOfCallNodeCand1(_, n1, _, n) or flowIntoCallNodeCand1(_, n1, n)
|
||||
|
|
||||
flowIntoCallNodeCand1(_, n1, n) and
|
||||
c = n.getEnclosingCallable()
|
||||
)
|
||||
) + sum(ParamNodeEx p1 | | getLanguageSpecificFlowIntoCallNodeCand1(n1, p1))
|
||||
@@ -1173,12 +1172,11 @@ module MakeImpl<LocationSig Location, InputSig<Location> Lang> {
|
||||
* contexts.
|
||||
*/
|
||||
pragma[nomagic]
|
||||
private int join(NodeEx n2) {
|
||||
private int join(ParamNodeEx n2) {
|
||||
result =
|
||||
strictcount(DataFlowCallable c |
|
||||
exists(NodeEx n |
|
||||
flowOutOfCallNodeCand1(_, n, _, n2) or flowIntoCallNodeCand1(_, n, n2)
|
||||
|
|
||||
flowIntoCallNodeCand1(_, n, n2) and
|
||||
c = n.getEnclosingCallable()
|
||||
)
|
||||
) + sum(ArgNodeEx arg2 | | getLanguageSpecificFlowIntoCallNodeCand1(arg2, n2))
|
||||
|
||||
Reference in New Issue
Block a user