Skip to content

Commit 333be60

Browse files
committed
Java: Add approx contents.
1 parent 9907e0d commit 333be60

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,9 @@ private module Cached {
8181
TMapKeyContentApprox() or
8282
TMapValueContentApprox() or
8383
TCapturedVariableContentApprox(CapturedVariable v) or
84-
TSyntheticFieldApproxContent()
84+
TSyntheticFieldApproxContent() or
85+
TLambdaReturnApprox(Method m) or
86+
TLambdaArgumentApprox(Method m, ArgumentPosition pos)
8587
}
8688

8789
import Cached

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -774,6 +774,13 @@ ContentApprox getContentApprox(Content c) {
774774
)
775775
or
776776
c instanceof SyntheticFieldContent and result = TSyntheticFieldApproxContent()
777+
or
778+
exists(Method m |
779+
c = TLambdaReturn(m) and result = TLambdaReturnApprox(m))
780+
or
781+
exists(Method m, ArgumentPosition pos |
782+
c = TLambdaArgument(m, pos) and result = TLambdaArgumentApprox(m, pos))
783+
777784
}
778785

779786
/**

0 commit comments

Comments
 (0)