mirror of
https://github.com/github/codeql.git
synced 2026-05-03 20:58:03 +02:00
C++: autoformat
This commit is contained in:
@@ -1,22 +1,21 @@
|
||||
private import RangeAnalysisStage
|
||||
|
||||
module FloatDelta implements DeltaSig {
|
||||
class Delta = float;
|
||||
|
||||
bindingset[d]
|
||||
bindingset[result]
|
||||
float toFloat(Delta d) {result = d}
|
||||
|
||||
bindingset[d]
|
||||
bindingset[result]
|
||||
int toInt(Delta d) {result = d}
|
||||
|
||||
|
||||
bindingset[n]
|
||||
bindingset[result] Delta fromInt(int n) {result = n}
|
||||
|
||||
|
||||
bindingset[f]
|
||||
bindingset[result] Delta fromFloat(float f) {result = f}
|
||||
}
|
||||
|
||||
class Delta = float;
|
||||
|
||||
bindingset[d]
|
||||
bindingset[result]
|
||||
float toFloat(Delta d) { result = d }
|
||||
|
||||
bindingset[d]
|
||||
bindingset[result]
|
||||
int toInt(Delta d) { result = d }
|
||||
|
||||
bindingset[n]
|
||||
bindingset[result]
|
||||
Delta fromInt(int n) { result = n }
|
||||
|
||||
bindingset[f]
|
||||
bindingset[result]
|
||||
Delta fromFloat(float f) { result = f }
|
||||
}
|
||||
|
||||
@@ -169,7 +169,9 @@ module ModulusAnalysis<DeltaSig D, BoundSig<D> Bounds, UtilSig<D> U> {
|
||||
* Holds if all inputs to `phi` numbered `1` to `rix` are equal to `b + val` modulo `mod`.
|
||||
*/
|
||||
pragma[nomagic]
|
||||
private predicate phiModulusRankStep(SemSsaPhiNode phi, Bounds::SemBound b, int val, int mod, int rix) {
|
||||
private predicate phiModulusRankStep(
|
||||
SemSsaPhiNode phi, Bounds::SemBound b, int val, int mod, int rix
|
||||
) {
|
||||
/*
|
||||
* base case. If any phi input is equal to `b + val` modulo `mod`, that's a potential congruence
|
||||
* class for the phi node.
|
||||
|
||||
@@ -231,7 +231,9 @@ signature module BoundSig<DeltaSig D> {
|
||||
class SemBound {
|
||||
SemExpr getExpr(D::Delta delta);
|
||||
}
|
||||
|
||||
class SemZeroBound extends SemBound;
|
||||
|
||||
class SemSsaBound extends SemBound {
|
||||
SemSsaVariable getAVariable();
|
||||
}
|
||||
|
||||
@@ -49,7 +49,9 @@ module RangeUtil<Range::DeltaSig D, Range::LangSig<D> Lang> implements Range::Ut
|
||||
* - `isEq = true` : `v == e + delta`
|
||||
* - `isEq = false` : `v != e + delta`
|
||||
*/
|
||||
SemGuard semEqFlowCond(SemSsaVariable v, SemExpr e, D::Delta delta, boolean isEq, boolean testIsTrue) {
|
||||
SemGuard semEqFlowCond(
|
||||
SemSsaVariable v, SemExpr e, D::Delta delta, boolean isEq, boolean testIsTrue
|
||||
) {
|
||||
exists(boolean eqpolarity |
|
||||
result.isEquality(semSsaRead(v, delta), e, eqpolarity) and
|
||||
(testIsTrue = true or testIsTrue = false) and
|
||||
|
||||
Reference in New Issue
Block a user