Skip to content

Commit f281ee4

Browse files
hvitvedCopilot
andcommitted
Shared: Format modulus analysis queries
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
1 parent aa45d82 commit f281ee4

2 files changed

Lines changed: 4 additions & 8 deletions

File tree

‎csharp/ql/lib/semmle/code/csharp/dataflow/ModulusAnalysis.qll‎

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,7 @@ private predicate valueFlowStepSsa(SsaVariable v, SsaReadPosition pos, Expr e, i
1919
exists(Guard guard, boolean testIsTrue |
2020
pos.hasReadOfVar(v) and
2121
guard = eqFlowCond(v, e, delta, true, testIsTrue) and
22-
guardControlsSsaRead(guard, pos,
23-
any(GuardValue gv | gv.asBooleanValue() = testIsTrue))
22+
guardControlsSsaRead(guard, pos, any(GuardValue gv | gv.asBooleanValue() = testIsTrue))
2423
)
2524
}
2625

@@ -92,8 +91,7 @@ private predicate moduloGuardedRead(SsaVariable v, SsaReadPosition pos, int val,
9291
exists(Guard guard, boolean testIsTrue |
9392
pos.hasReadOfVar(v) and
9493
guard = moduloCheck(v, val, mod, testIsTrue) and
95-
guardControlsSsaRead(guard, pos,
96-
any(GuardValue gv | gv.asBooleanValue() = testIsTrue))
94+
guardControlsSsaRead(guard, pos, any(GuardValue gv | gv.asBooleanValue() = testIsTrue))
9795
)
9896
}
9997

‎java/ql/lib/semmle/code/java/dataflow/ModulusAnalysis.qll‎

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,7 @@ private predicate valueFlowStepSsa(SsaVariable v, SsaReadPosition pos, Expr e, i
1919
exists(Guard guard, boolean testIsTrue |
2020
pos.hasReadOfVar(v) and
2121
guard = eqFlowCond(v, e, delta, true, testIsTrue) and
22-
guardControlsSsaRead(guard, pos,
23-
any(GuardValue gv | gv.asBooleanValue() = testIsTrue))
22+
guardControlsSsaRead(guard, pos, any(GuardValue gv | gv.asBooleanValue() = testIsTrue))
2423
)
2524
}
2625

@@ -92,8 +91,7 @@ private predicate moduloGuardedRead(SsaVariable v, SsaReadPosition pos, int val,
9291
exists(Guard guard, boolean testIsTrue |
9392
pos.hasReadOfVar(v) and
9493
guard = moduloCheck(v, val, mod, testIsTrue) and
95-
guardControlsSsaRead(guard, pos,
96-
any(GuardValue gv | gv.asBooleanValue() = testIsTrue))
94+
guardControlsSsaRead(guard, pos, any(GuardValue gv | gv.asBooleanValue() = testIsTrue))
9795
)
9896
}
9997

0 commit comments

Comments
 (0)