Skip to content

Commit 3bf28cc

Browse files
committed
DataFlow: Sync identical files.
1 parent 9647b6a commit 3bf28cc

File tree

8 files changed

+104
-0
lines changed

8 files changed

+104
-0
lines changed

cpp/ql/lib/experimental/semmle/code/cpp/ir/dataflow/internal/DataFlowImpl.qll

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -959,6 +959,17 @@ module Impl<FullStateConfigSig Config> {
959959
not inBarrier(p)
960960
}
961961

962+
/**
963+
* Gets an additional term that is added to `branch` and `join` when deciding whether
964+
* the amount of forward or backward branching is within the limit specified by the
965+
* configuration.
966+
*/
967+
pragma[nomagic]
968+
private int getLanguageSpecificFlowIntoCallNodeCand1(ArgNodeEx arg, ParamNodeEx p) {
969+
flowIntoCallNodeCand1(_, arg, p) and
970+
result = getAdditionalFlowIntoCallNodeTerm(arg.projectToNode(), p.projectToNode())
971+
}
972+
962973
/**
963974
* Gets the amount of forward branching on the origin of a cross-call path
964975
* edge in the graph of paths between sources and sinks that ignores call
@@ -968,6 +979,7 @@ module Impl<FullStateConfigSig Config> {
968979
private int branch(NodeEx n1) {
969980
result =
970981
strictcount(NodeEx n | flowOutOfCallNodeCand1(_, n1, _, n) or flowIntoCallNodeCand1(_, n1, n))
982+
+ sum(ParamNodeEx p1 | | getLanguageSpecificFlowIntoCallNodeCand1(n1, p1))
971983
}
972984

973985
/**
@@ -979,6 +991,7 @@ module Impl<FullStateConfigSig Config> {
979991
private int join(NodeEx n2) {
980992
result =
981993
strictcount(NodeEx n | flowOutOfCallNodeCand1(_, n, _, n2) or flowIntoCallNodeCand1(_, n, n2))
994+
+ sum(ArgNodeEx arg2 | | getLanguageSpecificFlowIntoCallNodeCand1(arg2, n2))
982995
}
983996

984997
/**

cpp/ql/lib/semmle/code/cpp/dataflow/internal/DataFlowImpl.qll

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -959,6 +959,17 @@ module Impl<FullStateConfigSig Config> {
959959
not inBarrier(p)
960960
}
961961

962+
/**
963+
* Gets an additional term that is added to `branch` and `join` when deciding whether
964+
* the amount of forward or backward branching is within the limit specified by the
965+
* configuration.
966+
*/
967+
pragma[nomagic]
968+
private int getLanguageSpecificFlowIntoCallNodeCand1(ArgNodeEx arg, ParamNodeEx p) {
969+
flowIntoCallNodeCand1(_, arg, p) and
970+
result = getAdditionalFlowIntoCallNodeTerm(arg.projectToNode(), p.projectToNode())
971+
}
972+
962973
/**
963974
* Gets the amount of forward branching on the origin of a cross-call path
964975
* edge in the graph of paths between sources and sinks that ignores call
@@ -968,6 +979,7 @@ module Impl<FullStateConfigSig Config> {
968979
private int branch(NodeEx n1) {
969980
result =
970981
strictcount(NodeEx n | flowOutOfCallNodeCand1(_, n1, _, n) or flowIntoCallNodeCand1(_, n1, n))
982+
+ sum(ParamNodeEx p1 | | getLanguageSpecificFlowIntoCallNodeCand1(n1, p1))
971983
}
972984

973985
/**
@@ -979,6 +991,7 @@ module Impl<FullStateConfigSig Config> {
979991
private int join(NodeEx n2) {
980992
result =
981993
strictcount(NodeEx n | flowOutOfCallNodeCand1(_, n, _, n2) or flowIntoCallNodeCand1(_, n, n2))
994+
+ sum(ArgNodeEx arg2 | | getLanguageSpecificFlowIntoCallNodeCand1(arg2, n2))
982995
}
983996

984997
/**

csharp/ql/lib/semmle/code/csharp/dataflow/internal/DataFlowImpl.qll

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -959,6 +959,17 @@ module Impl<FullStateConfigSig Config> {
959959
not inBarrier(p)
960960
}
961961

962+
/**
963+
* Gets an additional term that is added to `branch` and `join` when deciding whether
964+
* the amount of forward or backward branching is within the limit specified by the
965+
* configuration.
966+
*/
967+
pragma[nomagic]
968+
private int getLanguageSpecificFlowIntoCallNodeCand1(ArgNodeEx arg, ParamNodeEx p) {
969+
flowIntoCallNodeCand1(_, arg, p) and
970+
result = getAdditionalFlowIntoCallNodeTerm(arg.projectToNode(), p.projectToNode())
971+
}
972+
962973
/**
963974
* Gets the amount of forward branching on the origin of a cross-call path
964975
* edge in the graph of paths between sources and sinks that ignores call
@@ -968,6 +979,7 @@ module Impl<FullStateConfigSig Config> {
968979
private int branch(NodeEx n1) {
969980
result =
970981
strictcount(NodeEx n | flowOutOfCallNodeCand1(_, n1, _, n) or flowIntoCallNodeCand1(_, n1, n))
982+
+ sum(ParamNodeEx p1 | | getLanguageSpecificFlowIntoCallNodeCand1(n1, p1))
971983
}
972984

973985
/**
@@ -979,6 +991,7 @@ module Impl<FullStateConfigSig Config> {
979991
private int join(NodeEx n2) {
980992
result =
981993
strictcount(NodeEx n | flowOutOfCallNodeCand1(_, n, _, n2) or flowIntoCallNodeCand1(_, n, n2))
994+
+ sum(ArgNodeEx arg2 | | getLanguageSpecificFlowIntoCallNodeCand1(arg2, n2))
982995
}
983996

984997
/**

go/ql/lib/semmle/go/dataflow/internal/DataFlowImpl.qll

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -959,6 +959,17 @@ module Impl<FullStateConfigSig Config> {
959959
not inBarrier(p)
960960
}
961961

962+
/**
963+
* Gets an additional term that is added to `branch` and `join` when deciding whether
964+
* the amount of forward or backward branching is within the limit specified by the
965+
* configuration.
966+
*/
967+
pragma[nomagic]
968+
private int getLanguageSpecificFlowIntoCallNodeCand1(ArgNodeEx arg, ParamNodeEx p) {
969+
flowIntoCallNodeCand1(_, arg, p) and
970+
result = getAdditionalFlowIntoCallNodeTerm(arg.projectToNode(), p.projectToNode())
971+
}
972+
962973
/**
963974
* Gets the amount of forward branching on the origin of a cross-call path
964975
* edge in the graph of paths between sources and sinks that ignores call
@@ -968,6 +979,7 @@ module Impl<FullStateConfigSig Config> {
968979
private int branch(NodeEx n1) {
969980
result =
970981
strictcount(NodeEx n | flowOutOfCallNodeCand1(_, n1, _, n) or flowIntoCallNodeCand1(_, n1, n))
982+
+ sum(ParamNodeEx p1 | | getLanguageSpecificFlowIntoCallNodeCand1(n1, p1))
971983
}
972984

973985
/**
@@ -979,6 +991,7 @@ module Impl<FullStateConfigSig Config> {
979991
private int join(NodeEx n2) {
980992
result =
981993
strictcount(NodeEx n | flowOutOfCallNodeCand1(_, n, _, n2) or flowIntoCallNodeCand1(_, n, n2))
994+
+ sum(ArgNodeEx arg2 | | getLanguageSpecificFlowIntoCallNodeCand1(arg2, n2))
982995
}
983996

984997
/**

java/ql/lib/semmle/code/java/dataflow/internal/DataFlowImpl.qll

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -959,6 +959,17 @@ module Impl<FullStateConfigSig Config> {
959959
not inBarrier(p)
960960
}
961961

962+
/**
963+
* Gets an additional term that is added to `branch` and `join` when deciding whether
964+
* the amount of forward or backward branching is within the limit specified by the
965+
* configuration.
966+
*/
967+
pragma[nomagic]
968+
private int getLanguageSpecificFlowIntoCallNodeCand1(ArgNodeEx arg, ParamNodeEx p) {
969+
flowIntoCallNodeCand1(_, arg, p) and
970+
result = getAdditionalFlowIntoCallNodeTerm(arg.projectToNode(), p.projectToNode())
971+
}
972+
962973
/**
963974
* Gets the amount of forward branching on the origin of a cross-call path
964975
* edge in the graph of paths between sources and sinks that ignores call
@@ -968,6 +979,7 @@ module Impl<FullStateConfigSig Config> {
968979
private int branch(NodeEx n1) {
969980
result =
970981
strictcount(NodeEx n | flowOutOfCallNodeCand1(_, n1, _, n) or flowIntoCallNodeCand1(_, n1, n))
982+
+ sum(ParamNodeEx p1 | | getLanguageSpecificFlowIntoCallNodeCand1(n1, p1))
971983
}
972984

973985
/**
@@ -979,6 +991,7 @@ module Impl<FullStateConfigSig Config> {
979991
private int join(NodeEx n2) {
980992
result =
981993
strictcount(NodeEx n | flowOutOfCallNodeCand1(_, n, _, n2) or flowIntoCallNodeCand1(_, n, n2))
994+
+ sum(ArgNodeEx arg2 | | getLanguageSpecificFlowIntoCallNodeCand1(arg2, n2))
982995
}
983996

984997
/**

python/ql/lib/semmle/python/dataflow/new/internal/DataFlowImpl.qll

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -959,6 +959,17 @@ module Impl<FullStateConfigSig Config> {
959959
not inBarrier(p)
960960
}
961961

962+
/**
963+
* Gets an additional term that is added to `branch` and `join` when deciding whether
964+
* the amount of forward or backward branching is within the limit specified by the
965+
* configuration.
966+
*/
967+
pragma[nomagic]
968+
private int getLanguageSpecificFlowIntoCallNodeCand1(ArgNodeEx arg, ParamNodeEx p) {
969+
flowIntoCallNodeCand1(_, arg, p) and
970+
result = getAdditionalFlowIntoCallNodeTerm(arg.projectToNode(), p.projectToNode())
971+
}
972+
962973
/**
963974
* Gets the amount of forward branching on the origin of a cross-call path
964975
* edge in the graph of paths between sources and sinks that ignores call
@@ -968,6 +979,7 @@ module Impl<FullStateConfigSig Config> {
968979
private int branch(NodeEx n1) {
969980
result =
970981
strictcount(NodeEx n | flowOutOfCallNodeCand1(_, n1, _, n) or flowIntoCallNodeCand1(_, n1, n))
982+
+ sum(ParamNodeEx p1 | | getLanguageSpecificFlowIntoCallNodeCand1(n1, p1))
971983
}
972984

973985
/**
@@ -979,6 +991,7 @@ module Impl<FullStateConfigSig Config> {
979991
private int join(NodeEx n2) {
980992
result =
981993
strictcount(NodeEx n | flowOutOfCallNodeCand1(_, n, _, n2) or flowIntoCallNodeCand1(_, n, n2))
994+
+ sum(ArgNodeEx arg2 | | getLanguageSpecificFlowIntoCallNodeCand1(arg2, n2))
982995
}
983996

984997
/**

ruby/ql/lib/codeql/ruby/dataflow/internal/DataFlowImpl.qll

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -959,6 +959,17 @@ module Impl<FullStateConfigSig Config> {
959959
not inBarrier(p)
960960
}
961961

962+
/**
963+
* Gets an additional term that is added to `branch` and `join` when deciding whether
964+
* the amount of forward or backward branching is within the limit specified by the
965+
* configuration.
966+
*/
967+
pragma[nomagic]
968+
private int getLanguageSpecificFlowIntoCallNodeCand1(ArgNodeEx arg, ParamNodeEx p) {
969+
flowIntoCallNodeCand1(_, arg, p) and
970+
result = getAdditionalFlowIntoCallNodeTerm(arg.projectToNode(), p.projectToNode())
971+
}
972+
962973
/**
963974
* Gets the amount of forward branching on the origin of a cross-call path
964975
* edge in the graph of paths between sources and sinks that ignores call
@@ -968,6 +979,7 @@ module Impl<FullStateConfigSig Config> {
968979
private int branch(NodeEx n1) {
969980
result =
970981
strictcount(NodeEx n | flowOutOfCallNodeCand1(_, n1, _, n) or flowIntoCallNodeCand1(_, n1, n))
982+
+ sum(ParamNodeEx p1 | | getLanguageSpecificFlowIntoCallNodeCand1(n1, p1))
971983
}
972984

973985
/**
@@ -979,6 +991,7 @@ module Impl<FullStateConfigSig Config> {
979991
private int join(NodeEx n2) {
980992
result =
981993
strictcount(NodeEx n | flowOutOfCallNodeCand1(_, n, _, n2) or flowIntoCallNodeCand1(_, n, n2))
994+
+ sum(ArgNodeEx arg2 | | getLanguageSpecificFlowIntoCallNodeCand1(arg2, n2))
982995
}
983996

984997
/**

swift/ql/lib/codeql/swift/dataflow/internal/DataFlowImpl.qll

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -959,6 +959,17 @@ module Impl<FullStateConfigSig Config> {
959959
not inBarrier(p)
960960
}
961961

962+
/**
963+
* Gets an additional term that is added to `branch` and `join` when deciding whether
964+
* the amount of forward or backward branching is within the limit specified by the
965+
* configuration.
966+
*/
967+
pragma[nomagic]
968+
private int getLanguageSpecificFlowIntoCallNodeCand1(ArgNodeEx arg, ParamNodeEx p) {
969+
flowIntoCallNodeCand1(_, arg, p) and
970+
result = getAdditionalFlowIntoCallNodeTerm(arg.projectToNode(), p.projectToNode())
971+
}
972+
962973
/**
963974
* Gets the amount of forward branching on the origin of a cross-call path
964975
* edge in the graph of paths between sources and sinks that ignores call
@@ -968,6 +979,7 @@ module Impl<FullStateConfigSig Config> {
968979
private int branch(NodeEx n1) {
969980
result =
970981
strictcount(NodeEx n | flowOutOfCallNodeCand1(_, n1, _, n) or flowIntoCallNodeCand1(_, n1, n))
982+
+ sum(ParamNodeEx p1 | | getLanguageSpecificFlowIntoCallNodeCand1(n1, p1))
971983
}
972984

973985
/**
@@ -979,6 +991,7 @@ module Impl<FullStateConfigSig Config> {
979991
private int join(NodeEx n2) {
980992
result =
981993
strictcount(NodeEx n | flowOutOfCallNodeCand1(_, n, _, n2) or flowIntoCallNodeCand1(_, n, n2))
994+
+ sum(ArgNodeEx arg2 | | getLanguageSpecificFlowIntoCallNodeCand1(arg2, n2))
982995
}
983996

984997
/**

0 commit comments

Comments
 (0)