Remove Function.getACallExpr.

This commit is contained in:
Max Schaefer
2020-02-05 13:57:03 +00:00
parent 39b7272241
commit 46a8f8c8ed
3 changed files with 3 additions and 6 deletions

View File

@@ -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"

View File

@@ -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

View File

@@ -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()