mirror of
https://github.com/github/codeql.git
synced 2025-12-20 10:46:30 +01:00
Address review comments
This commit is contained in:
@@ -712,8 +712,8 @@ module Private {
|
||||
exists(SourceOrSinkElement e |
|
||||
sourceElement(e, output, kind) and
|
||||
if outputNeedsReference(specLast(output))
|
||||
then viableCallable(ref.asCall()) = any(InterpretNode n | n.asElement() = e).asCallable()
|
||||
else ref.asElement() = e
|
||||
then e = ref.getCallTarget()
|
||||
else e = ref.asElement()
|
||||
)
|
||||
}
|
||||
|
||||
@@ -721,8 +721,8 @@ module Private {
|
||||
exists(SourceOrSinkElement e |
|
||||
sinkElement(e, input, kind) and
|
||||
if inputNeedsReference(specLast(input))
|
||||
then viableCallable(ref.asCall()) = any(InterpretNode n | n.asElement() = e).asCallable()
|
||||
else ref.asElement() = e
|
||||
then e = ref.getCallTarget()
|
||||
else e = ref.asElement()
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
@@ -136,6 +136,9 @@ class InterpretNode extends TInterpretNode {
|
||||
/** Gets the callable that this node corresponds to, if any. */
|
||||
DataFlowCallable asCallable() { result = this.asElement() }
|
||||
|
||||
/** Gets the target of this call, if any. */
|
||||
Callable getCallTarget() { result = this.asCall().getARuntimeTarget() }
|
||||
|
||||
/** Gets a textual representation of this node. */
|
||||
string toString() {
|
||||
result = this.asElement().toString()
|
||||
|
||||
Reference in New Issue
Block a user