Skip to content

Commit 42b01bf

Browse files
committed
Very WIP
1 parent bb50116 commit 42b01bf

File tree

4 files changed

+554
-1091
lines changed

4 files changed

+554
-1091
lines changed

csharp/ql/lib/semmle/code/csharp/commons/Constants.qll

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
/** Provides logic for determining constant expressions. */
22

33
import csharp
4+
private import codeql.controlflow.SuccessorType
45
private import semmle.code.csharp.commons.ComparisonTest
56
private import semmle.code.csharp.commons.StructuralComparison as StructuralComparison
67

78
pragma[noinline]
89
private predicate isConstantCondition0(ControlFlowNode cfn, boolean b) {
9-
exists(cfn.getASuccessor(any(ControlFlow::BooleanSuccessor t | t.getValue() = b))) and
10-
strictcount(ControlFlow::SuccessorType t | exists(cfn.getASuccessor(t))) = 1
10+
exists(cfn.getASuccessor(any(BooleanSuccessor t | t.getValue() = b))) and
11+
strictcount(SuccessorType t | exists(cfn.getASuccessor(t))) = 1
1112
}
1213

1314
/**

0 commit comments

Comments
 (0)