Skip to content

C++: Sync the product-flow field flow branch limits with the default one #19904

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 5 additions & 16 deletions cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/ProductFlow.qll
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import semmle.code.cpp.dataflow.new.DataFlow
private import DataFlowPrivate
private import DataFlowUtil
private import DataFlowImplCommon
private import DataFlowImplSpecific
private import codeql.util.Unit

/**
Expand Down Expand Up @@ -95,10 +96,7 @@ module ProductFlow {
* This can be overridden to a smaller value to improve performance (a
* value of 0 disables field flow), or a larger value to get more results.
*/
default int fieldFlowBranchLimit1() {
// NOTE: This should be synchronized with the default value in the shared dataflow library
result = 2
}
default int fieldFlowBranchLimit1() { result = CppDataFlow::defaultFieldFlowBranchLimit() }

/**
* Gets the virtual dispatch branching limit when calculating field flow in the second
Expand All @@ -107,10 +105,7 @@ module ProductFlow {
* This can be overridden to a smaller value to improve performance (a
* value of 0 disables field flow), or a larger value to get more results.
*/
default int fieldFlowBranchLimit2() {
// NOTE: This should be synchronized with the default value in the shared dataflow library
result = 2
}
default int fieldFlowBranchLimit2() { result = CppDataFlow::defaultFieldFlowBranchLimit() }
}

/**
Expand Down Expand Up @@ -304,10 +299,7 @@ module ProductFlow {
* This can be overridden to a smaller value to improve performance (a
* value of 0 disables field flow), or a larger value to get more results.
*/
default int fieldFlowBranchLimit1() {
// NOTE: This should be synchronized with the default value in the shared dataflow library
result = 2
}
default int fieldFlowBranchLimit1() { result = CppDataFlow::defaultFieldFlowBranchLimit() }

/**
* Gets the virtual dispatch branching limit when calculating field flow in the second
Expand All @@ -316,10 +308,7 @@ module ProductFlow {
* This can be overridden to a smaller value to improve performance (a
* value of 0 disables field flow), or a larger value to get more results.
*/
default int fieldFlowBranchLimit2() {
// NOTE: This should be synchronized with the default value in the shared dataflow library
result = 2
}
default int fieldFlowBranchLimit2() { result = CppDataFlow::defaultFieldFlowBranchLimit() }
}

/**
Expand Down
Loading