File tree Expand file tree Collapse file tree 2 files changed +2
-40
lines changed
ruby/ql/lib/codeql/ruby/controlflow Expand file tree Collapse file tree 2 files changed +2
-40
lines changed Original file line number Diff line number Diff line change @@ -73,16 +73,14 @@ module SuccessorTypes {
7373 }
7474
7575 /**
76- * A conditional control flow successor. Either a Boolean successor (`BooleanSuccessor`),
77- * an emptiness successor (`EmptinessSuccessor`), or a matching successor
78- * (`MatchingSuccessor`)
76+ * A conditional control flow successor. Either a Boolean successor (`BooleanSuccessor`)
77+ * or a matching successor (`MatchingSuccessor`)
7978 */
8079 class ConditionalSuccessor extends SuccessorType {
8180 boolean value ;
8281
8382 ConditionalSuccessor ( ) {
8483 this = CfgImpl:: TBooleanSuccessor ( value ) or
85- this = CfgImpl:: TEmptinessSuccessor ( value ) or
8684 this = CfgImpl:: TMatchingSuccessor ( value )
8785 }
8886
@@ -109,41 +107,6 @@ module SuccessorTypes {
109107 */
110108 class BooleanSuccessor extends ConditionalSuccessor , CfgImpl:: TBooleanSuccessor { }
111109
112- /**
113- * An emptiness control flow successor.
114- *
115- * For example, this program fragment:
116- *
117- * ```rb
118- * for arg in args do
119- * puts arg
120- * end
121- * puts "done";
122- * ```
123- *
124- * has a control flow graph containing emptiness successors:
125- *
126- * ```
127- * args
128- * |
129- * for------<-----
130- * / \ \
131- * / \ |
132- * / \ |
133- * / \ |
134- * empty non-empty |
135- * | \ |
136- * puts "done" \ |
137- * arg |
138- * | |
139- * puts arg |
140- * \___/
141- * ```
142- */
143- class EmptinessSuccessor extends ConditionalSuccessor , CfgImpl:: TEmptinessSuccessor {
144- override string toString ( ) { if value = true then result = "empty" else result = "non-empty" }
145- }
146-
147110 /**
148111 * A matching control flow successor.
149112 *
Original file line number Diff line number Diff line change @@ -1513,7 +1513,6 @@ private module Cached {
15131513 newtype TSuccessorType =
15141514 TSuccessorSuccessor ( ) or
15151515 TBooleanSuccessor ( boolean b ) { b in [ false , true ] } or
1516- TEmptinessSuccessor ( boolean isEmpty ) { isEmpty in [ false , true ] } or
15171516 TMatchingSuccessor ( boolean isMatch ) { isMatch in [ false , true ] } or
15181517 TReturnSuccessor ( ) or
15191518 TBreakSuccessor ( ) or
You can’t perform that action at this time.
0 commit comments