mirror of
https://github.com/github/codeql.git
synced 2026-02-07 18:51:06 +01:00
Merge pull request #32 from github/jumpToField
get jump to field to work
This commit is contained in:
@@ -48,6 +48,11 @@ private predicate resolveVar(VarAccess va, VarDecl decl, string kind) {
|
||||
kind = "variable"
|
||||
}
|
||||
|
||||
private predicate resolveField(FieldAccess va, VarDecl decl, string kind) {
|
||||
decl = va.getDeclaration() and
|
||||
kind = "field"
|
||||
}
|
||||
|
||||
private predicate resolveCall(Call c, Predicate p, string kind) {
|
||||
p = c.getTarget().getDeclaration() and
|
||||
kind = "call"
|
||||
@@ -61,6 +66,8 @@ predicate resolve(Loc ref, Loc target, string kind) {
|
||||
or
|
||||
resolvePredicate(ref.asAst(), target.asAst(), kind)
|
||||
or
|
||||
resolveField(ref.asAst(), target.asAst(), kind)
|
||||
or
|
||||
resolveVar(ref.asAst(), target.asAst(), kind)
|
||||
or
|
||||
resolveCall(ref.asAst(), target.asAst(), kind)
|
||||
|
||||
Reference in New Issue
Block a user