Skip to content

Commit 6db7281

Browse files
committed
C++: autoformat
1 parent 02f1957 commit 6db7281

File tree

4 files changed

+26
-21
lines changed

4 files changed

+26
-21
lines changed
Lines changed: 18 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,21 @@
11
private import RangeAnalysisStage
22

33
module FloatDelta implements DeltaSig {
4-
class Delta = float;
5-
6-
bindingset[d]
7-
bindingset[result]
8-
float toFloat(Delta d) {result = d}
9-
10-
bindingset[d]
11-
bindingset[result]
12-
int toInt(Delta d) {result = d}
13-
14-
15-
bindingset[n]
16-
bindingset[result] Delta fromInt(int n) {result = n}
17-
18-
19-
bindingset[f]
20-
bindingset[result] Delta fromFloat(float f) {result = f}
21-
}
22-
4+
class Delta = float;
5+
6+
bindingset[d]
7+
bindingset[result]
8+
float toFloat(Delta d) { result = d }
9+
10+
bindingset[d]
11+
bindingset[result]
12+
int toInt(Delta d) { result = d }
13+
14+
bindingset[n]
15+
bindingset[result]
16+
Delta fromInt(int n) { result = n }
17+
18+
bindingset[f]
19+
bindingset[result]
20+
Delta fromFloat(float f) { result = f }
21+
}

cpp/ql/lib/experimental/semmle/code/cpp/semantic/analysis/ModulusAnalysis.qll

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,9 @@ module ModulusAnalysis<DeltaSig D, BoundSig<D> Bounds, UtilSig<D> U> {
169169
* Holds if all inputs to `phi` numbered `1` to `rix` are equal to `b + val` modulo `mod`.
170170
*/
171171
pragma[nomagic]
172-
private predicate phiModulusRankStep(SemSsaPhiNode phi, Bounds::SemBound b, int val, int mod, int rix) {
172+
private predicate phiModulusRankStep(
173+
SemSsaPhiNode phi, Bounds::SemBound b, int val, int mod, int rix
174+
) {
173175
/*
174176
* base case. If any phi input is equal to `b + val` modulo `mod`, that's a potential congruence
175177
* class for the phi node.

cpp/ql/lib/experimental/semmle/code/cpp/semantic/analysis/RangeAnalysisStage.qll

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,9 @@ signature module BoundSig<DeltaSig D> {
231231
class SemBound {
232232
SemExpr getExpr(D::Delta delta);
233233
}
234+
234235
class SemZeroBound extends SemBound;
236+
235237
class SemSsaBound extends SemBound {
236238
SemSsaVariable getAVariable();
237239
}

cpp/ql/lib/experimental/semmle/code/cpp/semantic/analysis/RangeUtils.qll

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,9 @@ module RangeUtil<Range::DeltaSig D, Range::LangSig<D> Lang> implements Range::Ut
4949
* - `isEq = true` : `v == e + delta`
5050
* - `isEq = false` : `v != e + delta`
5151
*/
52-
SemGuard semEqFlowCond(SemSsaVariable v, SemExpr e, D::Delta delta, boolean isEq, boolean testIsTrue) {
52+
SemGuard semEqFlowCond(
53+
SemSsaVariable v, SemExpr e, D::Delta delta, boolean isEq, boolean testIsTrue
54+
) {
5355
exists(boolean eqpolarity |
5456
result.isEquality(semSsaRead(v, delta), e, eqpolarity) and
5557
(testIsTrue = true or testIsTrue = false) and

0 commit comments

Comments
 (0)