Skip to content

Commit 21c9708

Browse files
authored
Merge pull request #19361 from jketema/fieldflow
Dataflow: Make default field flow branch limit configurable per language
2 parents 55a8a44 + 46b21af commit 21c9708

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

shared/dataflow/codeql/dataflow/DataFlow.qll

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -342,6 +342,9 @@ signature module InputSig<LocationSig Location> {
342342
any()
343343
}
344344

345+
/** Gets the default value for the `fieldFlowBranchLimit` */
346+
default int defaultFieldFlowBranchLimit() { result = 2 }
347+
345348
/** Holds if `fieldFlowBranchLimit` should be ignored for flow going into/out of `c`. */
346349
default predicate ignoreFieldFlowBranchLimit(DataFlowCallable c) { none() }
347350
}
@@ -399,7 +402,7 @@ module Configs<LocationSig Location, InputSig<Location> Lang> {
399402
* This can be overridden to a smaller value to improve performance (a
400403
* value of 0 disables field flow), or a larger value to get more results.
401404
*/
402-
default int fieldFlowBranchLimit() { result = 2 }
405+
default int fieldFlowBranchLimit() { result = Lang::defaultFieldFlowBranchLimit() }
403406

404407
/** Gets the access path limit. */
405408
default int accessPathLimit() { result = Lang::accessPathLimit() }
@@ -548,7 +551,7 @@ module Configs<LocationSig Location, InputSig<Location> Lang> {
548551
* This can be overridden to a smaller value to improve performance (a
549552
* value of 0 disables field flow), or a larger value to get more results.
550553
*/
551-
default int fieldFlowBranchLimit() { result = 2 }
554+
default int fieldFlowBranchLimit() { result = Lang::defaultFieldFlowBranchLimit() }
552555

553556
/** Gets the access path limit. */
554557
default int accessPathLimit() { result = Lang::accessPathLimit() }

0 commit comments

Comments
 (0)