mirror of
https://github.com/github/codeql.git
synced 2026-01-29 14:23:03 +01:00
Remove Function.getACallExpr.
This commit is contained in:
@@ -16,7 +16,7 @@ where
|
||||
(len = Builtin::len() or len = Builtin::cap()) and
|
||||
(
|
||||
exists(RelationalComparisonExpr rel | rel = cmp |
|
||||
rel.getLesserOperand() = len.getACallExpr() and
|
||||
rel.getLesserOperand() = len.getACall().asExpr() and
|
||||
rel.getGreaterOperand().getIntValue() = ub and
|
||||
(
|
||||
ub < 0
|
||||
@@ -27,7 +27,7 @@ where
|
||||
)
|
||||
or
|
||||
exists(EqualityTestExpr eq | eq = cmp |
|
||||
eq.getAnOperand() = len.getACallExpr() and
|
||||
eq.getAnOperand() = len.getACall().asExpr() and
|
||||
eq.getAnOperand().getIntValue() = ub and
|
||||
ub < 0 and
|
||||
r = "equal"
|
||||
|
||||
@@ -464,7 +464,7 @@ class CallExpr extends CallOrConversionExpr {
|
||||
}
|
||||
|
||||
/** Gets the declared target of this call. */
|
||||
Function getTarget() { this = result.getACallExpr() }
|
||||
Function getTarget() { getCalleeExpr() = result.getAReference() }
|
||||
|
||||
override predicate mayHaveOwnSideEffects() {
|
||||
getTarget().mayHaveSideEffects() or
|
||||
|
||||
@@ -276,9 +276,6 @@ class Field extends Variable {
|
||||
|
||||
/** A built-in or declared function. */
|
||||
class Function extends ValueEntity, @functionobject {
|
||||
/** Gets an expression representing a call to this function. */
|
||||
CallExpr getACallExpr() { result.getCalleeExpr() = getAReference() }
|
||||
|
||||
/** Gets a call to this function. */
|
||||
DataFlow::CallNode getACall() {
|
||||
this = result.getTarget()
|
||||
|
||||
Reference in New Issue
Block a user