mirror of
https://github.com/github/codeql.git
synced 2026-02-20 00:43:44 +01:00
Use Generated::AstNode in ExprChildMapping
This commit is contained in:
@@ -11,8 +11,6 @@ private import codeql_ruby.controlflow.internal.ControlFlowGraphImpl
|
||||
class Stmt extends AstNode {
|
||||
override Stmt::Range range;
|
||||
|
||||
Stmt() { this = range }
|
||||
|
||||
/** Gets a control-flow node for this statement, if any. */
|
||||
CfgNodes::AstCfgNode getAControlFlowNode() { result.getNode() = this }
|
||||
|
||||
|
||||
@@ -135,14 +135,16 @@ abstract private class ExprChildMapping extends Expr {
|
||||
*/
|
||||
abstract predicate relevantChild(Expr child);
|
||||
|
||||
private AstNode getAChildStar() {
|
||||
private Generated::AstNode getAChildStar() {
|
||||
result = this
|
||||
or
|
||||
result.(Generated::AstNode).getParent() = this.getAChildStar()
|
||||
}
|
||||
|
||||
pragma[noinline]
|
||||
private BasicBlock getABasicBlockInScope() { result.getANode().getNode() = this.getAChildStar() }
|
||||
private BasicBlock getABasicBlockInScope() {
|
||||
result.getANode() = TAstNode(this.getAChildStar(), _)
|
||||
}
|
||||
|
||||
pragma[nomagic]
|
||||
private predicate reachesBasicBlockBase(Expr child, CfgNode cfn, BasicBlock bb) {
|
||||
|
||||
Reference in New Issue
Block a user