mirror of
https://github.com/github/codeql.git
synced 2026-04-28 18:25:24 +02:00
add DataFlow::getEnclosingExpr to get the an Expr from a potentially reflective call
This commit is contained in:
@@ -211,9 +211,9 @@ where
|
||||
msg = "the $@ does not return anything, yet the return value from the call to " + call.getCalleeName() + " is used." and
|
||||
name = "callback function"
|
||||
) and
|
||||
not benignContext(call.asExpr()) and
|
||||
not benignContext(call.getEnclosingExpr()) and
|
||||
not lastStatementHasNoEffect(func) and
|
||||
// anonymous one-shot closure. Those are used in weird ways and we ignore them.
|
||||
not oneshotClosure(call.asExpr())
|
||||
not oneshotClosure(call.getEnclosingExpr())
|
||||
select
|
||||
call, msg, func, name
|
||||
|
||||
Reference in New Issue
Block a user