Java: Introduce SsaCapturedDefinition and replace uses of getAnUltimateDefinition.

This commit is contained in:
Anders Schack-Mulligen
2025-11-07 10:14:22 +01:00
parent 483b2d89a7
commit 06df5c0bd1
10 changed files with 64 additions and 24 deletions

View File

@@ -277,10 +277,7 @@ private module SinkModelGeneratorInput implements SinkModelGeneratorInputSig {
predicate sinkModelSanitizer(DataFlow::Node node) {
// exclude variable capture jump steps
exists(Ssa::SsaImplicitInit closure |
closure.captures(_) and
node.asExpr() = Ssa::ssaGetAFirstUse(closure)
)
exists(Ssa::SsaCapturedDefinition closure | node.asExpr() = Ssa::ssaGetAFirstUse(closure))
}
predicate apiSource(DataFlow::Node source) {