From f37c862c92b791747fa92892d37a2d567bcbd3d0 Mon Sep 17 00:00:00 2001 From: Nick Rolfe Date: Fri, 19 Mar 2021 14:27:29 +0000 Subject: [PATCH] Rename MandatoryParameterTree to NonDefaultValueParameterTree --- .../controlflow/internal/ControlFlowGraphImpl.qll | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/ql/src/codeql_ruby/controlflow/internal/ControlFlowGraphImpl.qll b/ql/src/codeql_ruby/controlflow/internal/ControlFlowGraphImpl.qll index 241fe949329..5c6816e0287 100644 --- a/ql/src/codeql_ruby/controlflow/internal/ControlFlowGraphImpl.qll +++ b/ql/src/codeql_ruby/controlflow/internal/ControlFlowGraphImpl.qll @@ -378,7 +378,7 @@ module Trees { final override ControlFlowTree getChildNode(int i) { result = this.getValue() and i = 0 } } - abstract private class MandatoryParameterTree extends ControlFlowTree, NamedParameter { + abstract private class NonDefaultValueParameterTree extends ControlFlowTree, NamedParameter { final override predicate first(AstNode first) { this.getDefiningAccess().(ControlFlowTree).first(first) } @@ -394,7 +394,7 @@ module Trees { final override predicate succ(AstNode pred, AstNode succ, Completion c) { none() } } - private class BlockParameterTree extends MandatoryParameterTree, BlockParameter { } + private class BlockParameterTree extends NonDefaultValueParameterTree, BlockParameter { } /** * TODO: make all StmtSequence tree classes post-order, and simplify class @@ -888,7 +888,7 @@ module Trees { final override ControlFlowTree getChildNode(int i) { result = this.getValue() and i = 0 } } - private class HashSplatParameterTree extends MandatoryParameterTree, HashSplatParameter { } + private class HashSplatParameterTree extends NonDefaultValueParameterTree, HashSplatParameter { } private class HereDocTree extends StandardPreOrderTree, HereDoc { final override ControlFlowTree getChildNode(int i) { result = this.getComponent(i) } @@ -1130,7 +1130,7 @@ module Trees { private class SelfTree extends LeafTree, Self { } - private class SimpleParameterTree extends MandatoryParameterTree, SimpleParameter { } + private class SimpleParameterTree extends NonDefaultValueParameterTree, SimpleParameter { } // Corner case: For duplicated '_' parameters, only the first occurence has a defining // access. For subsequent parameters we simply include the parameter itself in the CFG @@ -1228,7 +1228,7 @@ module Trees { final override ControlFlowTree getChildNode(int i) { result = this.getValue() and i = 0 } } - private class SplatParameterTree extends MandatoryParameterTree, SplatParameter { } + private class SplatParameterTree extends NonDefaultValueParameterTree, SplatParameter { } abstract class StmtSequenceTree extends ControlFlowTree, StmtSequence { override predicate propagatesAbnormal(AstNode child) { none() }