Skip to content
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

Rust: Adopt shared flow summaries library #18130

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

hvitved
Copy link
Contributor

@hvitved hvitved commented Nov 27, 2024

Introduces the class SummarizedCallable for defining flow summaries in QL. Models-as-data will be added follow-up.

@github-actions github-actions bot added the Rust Pull requests that update Rust code label Nov 27, 2024
1000 + i
}

fn sink(s: i64) {

Check notice

Code scanning / CodeQL

Unused variable Note test

Variable 's' is not used.
}

// has a flow model
fn identity(i: i64) -> i64 {

Check notice

Code scanning / CodeQL

Unused variable Note test

Variable 'i' is not used.
}

// has a flow model
fn get_var_pos(e: MyPosEnum) -> i64 {

Check notice

Code scanning / CodeQL

Unused variable Note test

Variable 'e' is not used.
}

// has a flow model
fn set_var_pos(i: i64) -> MyPosEnum {

Check notice

Code scanning / CodeQL

Unused variable Note test

Variable 'i' is not used.
}

// has a flow model
fn get_var_field(e: MyFieldEnum) -> i64 {

Check notice

Code scanning / CodeQL

Unused variable Note test

Variable 'e' is not used.
}

// has a flow model
fn set_var_field(i: i64) -> MyFieldEnum {

Check notice

Code scanning / CodeQL

Unused variable Note test

Variable 'i' is not used.
result.asLibraryCallable() = this.getSummarizedCallable()
}

override EmptyLocation getLocation() { any() }

Check warning

Code scanning / CodeQL

Override with unmentioned parameter Warning

Override predicate doesn't mention
result
. Maybe mention it in a 'exists(result)'?
(
LocalFlow::localFlowStepCommon(nodeFrom, nodeTo)
or
exists(SsaImpl::DefinitionExt def, boolean isUseStep |

Check warning

Code scanning / CodeQL

Omittable 'exists' variable Warning

This exists variable can be omitted by using a don't-care expression
in this argument
.
@hvitved hvitved added the no-change-note-required This PR does not need a change note label Nov 27, 2024
@hvitved hvitved marked this pull request as ready for review November 27, 2024 14:42
@hvitved hvitved requested review from a team as code owners November 27, 2024 14:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C# DataFlow Library Java no-change-note-required This PR does not need a change note Ruby Rust Pull requests that update Rust code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant