@@ -940,7 +940,7 @@ module Statements {
940
940
not this instanceof JumpStmt
941
941
}
942
942
943
- final override ControlFlowTree getChildElement ( int i ) {
943
+ private ControlFlowTree getChildElement0 ( int i ) {
944
944
not this instanceof GeneralCatchClause and
945
945
not this instanceof FixedStmt and
946
946
not this instanceof UsingBlockStmt and
@@ -959,25 +959,24 @@ module Statements {
959
959
or
960
960
this =
961
961
any ( UsingBlockStmt us |
962
- if exists ( us .getExpr ( ) )
963
- then (
964
- result = us .getExpr ( ) and
965
- i = 0
966
- or
967
- result = us .getBody ( ) and
968
- i = 1
969
- ) else (
970
- result = us .getVariableDeclExpr ( i )
971
- or
972
- result = us .getBody ( ) and
973
- i = max ( int j | exists ( us .getVariableDeclExpr ( j ) ) ) + 1
974
- )
962
+ result = us .getExpr ( ) and
963
+ i = 0
964
+ or
965
+ result = us .getVariableDeclExpr ( i )
966
+ or
967
+ result = us .getBody ( ) and
968
+ i = max ( [ 1 , count ( us .getVariableDeclExpr ( _) ) ] )
975
969
)
976
970
or
977
971
result = this .( DefaultCase ) .getStmt ( ) and
978
972
i = 0
979
973
}
980
974
975
+ final override ControlFlowTree getChildElement ( int i ) {
976
+ result =
977
+ rank [ i + 1 ] ( ControlFlowElement cfe , int j | cfe = this .getChildElement0 ( j ) | cfe order by j )
978
+ }
979
+
981
980
final override predicate last ( ControlFlowElement last , Completion c ) {
982
981
last ( this .getLastChild ( ) , last , c )
983
982
or
0 commit comments