mirror of
https://github.com/github/codeql.git
synced 2025-12-16 16:53:25 +01:00
Python: CG trace: Rename ValidRecordedCall to IdentifiedRecordedCall
This commit is contained in:
@@ -113,10 +113,10 @@ private Builtin traverse_qualname(Builtin parent, string qualname) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Class of recorded calls where we can uniquely identify both the `call` and the `callee`.
|
||||
* Class of recorded calls where we can identify both the `call` and the `callee`.
|
||||
*/
|
||||
class ValidRecordedCall extends XMLRecordedCall {
|
||||
ValidRecordedCall() {
|
||||
class IdentifiedRecordedCall extends XMLRecordedCall {
|
||||
IdentifiedRecordedCall() {
|
||||
strictcount(this.getCall()) = 1 and
|
||||
(
|
||||
strictcount(this.getXMLCallee().(XMLPythonCallee).getCallee()) = 1
|
||||
@@ -145,12 +145,12 @@ class ValidRecordedCall extends XMLRecordedCall {
|
||||
}
|
||||
}
|
||||
|
||||
class InvalidRecordedCall extends XMLRecordedCall {
|
||||
InvalidRecordedCall() { not this instanceof ValidRecordedCall }
|
||||
class UnidentifiedRecordedCall extends XMLRecordedCall {
|
||||
UnidentifiedRecordedCall() { not this instanceof IdentifiedRecordedCall }
|
||||
}
|
||||
|
||||
module PointsToBasedCallGraph {
|
||||
class ResolvableRecordedCall extends ValidRecordedCall {
|
||||
class ResolvableRecordedCall extends IdentifiedRecordedCall {
|
||||
Value calleeValue;
|
||||
|
||||
ResolvableRecordedCall() {
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import RecordedCalls
|
||||
|
||||
from RecordedCall rc
|
||||
where not rc instanceof ValidRecordedCall
|
||||
from UnidentifiedRecordedCall rc, XMLCall xml_call
|
||||
select "Could not uniquely identify this recorded call (either call or callee was not uniquely identified)",
|
||||
rc, rc.call_filename(), rc.call_linenum(), rc.call_inst_index()
|
||||
rc, rc.getXMLCall().get_filename_data(), rc.getXMLCall().get_linenum_data(), rc.getXMLCall().get_inst_index_data()
|
||||
|
||||
Reference in New Issue
Block a user