mirror of
https://github.com/github/codeql.git
synced 2026-04-27 01:35:13 +02:00
The `ParentChild` tests have been generalized to test all `PrintAst` by factoring out `PrintAstNode` into a separate file. The `child.ql` and `parent.ql` tests have been removed as they are subsumed by `PrintAst.ql`. Also, a new `no_parent_child_loops` is added to detect back edges to a root node (back edges to a non-root node are already detected by `no_double_parents.ql`).
9 lines
262 B
Plaintext
9 lines
262 B
Plaintext
private import codeql.swift.printast.PrintAstNode
|
|
|
|
from PrintAstNode parent, int index1, int index2, PrintAstNode child
|
|
where
|
|
index1 != index2 and
|
|
parent.hasChild(child, index1, _) and
|
|
parent.hasChild(child, index2, _)
|
|
select parent, child, index1, index2
|