File tree Expand file tree Collapse file tree 1 file changed +9
-5
lines changed
csharp/ql/src/semmle/code/csharp/controlflow Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -1271,18 +1271,22 @@ module Internal {
12711271 exists ( ConditionOnExprComparisonConfig c | c .same ( sub , guarded .getElement ( ) ) )
12721272 }
12731273
1274+ pragma [ noinline]
1275+ private predicate isGuardedByNode2 ( ControlFlow:: Nodes:: ElementNode guarded , Ssa:: Definition def ) {
1276+ isGuardedByNode1 ( guarded , _, _, _) and
1277+ exists ( BasicBlock bb | bb = guarded .getBasicBlock ( ) |
1278+ def = guarded .getElement ( ) .( AccessOrCallExpr ) .getAnSsaQualifier ( bb .getANode ( ) )
1279+ )
1280+ }
1281+
12741282 cached
12751283 predicate isGuardedByNode (
12761284 ControlFlow:: Nodes:: ElementNode guarded , Guard g , AccessOrCallExpr sub , AbstractValue v
12771285 ) {
12781286 isGuardedByNode1 ( guarded , g , sub , v ) and
12791287 sub = g .getAChildExpr * ( ) and
12801288 forall ( Ssa:: Definition def | def = sub .getAnSsaQualifier ( _) |
1281- exists ( ControlFlow:: Node cfn |
1282- def = guarded .getElement ( ) .( AccessOrCallExpr ) .getAnSsaQualifier ( cfn )
1283- |
1284- cfn .getBasicBlock ( ) = guarded .getBasicBlock ( )
1285- )
1289+ isGuardedByNode2 ( guarded , def )
12861290 )
12871291 }
12881292
You can’t perform that action at this time.
0 commit comments