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

Data flow: Rework lambda flow [DO NOT MERGE] #17975

Draft
wants to merge 19 commits into
base: main
Choose a base branch
from
Draft

Conversation

hvitved
Copy link
Contributor

@hvitved hvitved commented Nov 13, 2024

No description provided.

@github-actions github-actions bot added the Java label Nov 13, 2024
@@ -585,8 +599,7 @@

class LambdaCallKind = Method; // the "apply" method in the functional interface

/** Holds if `creation` is an expression that creates a lambda of kind `kind` for `c`. */
predicate lambdaCreation(Node creation, LambdaCallKind kind, DataFlowCallable c) {
predicate lambdaCreationHelper(Node creation, LambdaCallKind kind, DataFlowCallable c) {

Check warning

Code scanning / CodeQL

Candidate predicate not marked as `nomagic` Warning

Candidate predicate to
lambdaCreation
is not marked as nomagic.
@github-actions github-actions bot added the C# label Nov 13, 2024
n.(PostUpdateNode).getPreUpdateNode().(ExprNode).getControlFlowNode(),
n.(LocalFunctionCreationPostUpdateNode).getUnderlyingControlFlowNode()
]
[n.(PostUpdateNode).getPreUpdateNode().(ExprNode).getControlFlowNode(),]

Check warning

Code scanning / CodeQL

Singleton set literal Warning

Singleton set literal can be replaced by its member.
TSyntheticFieldContent(SyntheticField s) or
TLambdaReturnContent(Method m) or
TLambdaArgumentContent(Method m, ArgumentPosition pos) {
exists(m.getParameter(pos)) or pos = -1

Check warning

Code scanning / CodeQL

Var only used in one side of disjunct. Warning

The
variable m
is only used in one side of disjunct.
TSyntheticFieldApproxContent() or
TLambdaReturnContentApprox(Method m) or
TLambdaArgumentApprox(Method m, ArgumentPosition pos) {
exists(m.getParameter(pos)) or pos = -1

Check warning

Code scanning / CodeQL

Var only used in one side of disjunct. Warning

The
variable m
is only used in one side of disjunct.
TNodeLambdaMalloc(Node lambda) { lambdaCreation(lambda, _, _, _) } or
TNodeLambdaArgs(Node lambda) { lambdaCreation(lambda, _, _, _) } or
TNodeLambdaArg(DataFlowCall synthCall, ArgumentPosition apos, Boolean ispost) {
exists(DataFlowCallable c, ParameterNode p, ParameterPosition ppos |

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
.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants