C++: Move mayBeFromImplicitlyDeclaredFunction to Call

This commit is contained in:
Calum Grant
2024-10-18 15:56:08 +01:00
parent 419780591a
commit 0fcabc4e61
4 changed files with 9 additions and 11 deletions

View File

@@ -149,6 +149,11 @@ class Call extends Expr, NameQualifiableElement, TCall {
variableAddressEscapesTreeNonConst(va, this.getQualifier().getFullyConverted()) and
i = -1
}
/** Holds if this expression could be the return value of an implicitly declared function. */
predicate mayBeFromImplicitlyDeclaredFunction() {
this.getTarget().getADeclarationEntry().isImplicit()
}
}
/**
@@ -300,10 +305,6 @@ class FunctionCall extends Call, @funbindexpr {
this.isVirtual() or
this.getTarget().getAnAttribute().getName() = "weak"
}
override predicate mayBeFromImplicitlyDeclaredFunction() {
this.getTarget().getADeclarationEntry().isImplicit()
}
}
/** A _user-defined_ unary `operator*` function. */

View File

@@ -534,9 +534,6 @@ class Expr extends StmtParent, @expr {
/** Gets the function containing this control-flow node. */
override Function getControlFlowScope() { result = this.getEnclosingFunction() }
/** Holds if this expression could be the return value of an implicitly declared function. */
predicate mayBeFromImplicitlyDeclaredFunction() { none() }
}
/**