WIP: Go: Add context query for retrieving call graph edges

This commit is contained in:
Aditya Sharad
2025-04-17 15:06:16 -07:00
parent 4a1b988f39
commit 93efbfe1c7

15
go/ql/src/CallGraph.ql Normal file
View File

@@ -0,0 +1,15 @@
/**
* @name Call graph
* @description Generates the call graph for the program.
* @kind graph
* @id go/call-graph
*/
import go
import semmle.go.dataflow.DataFlow
query predicate edges(CallExpr call, Function f, string key, string value) {
call.getTarget() = f and
key = "semmle.label" and
value = f.getQualifiedName()
}