Skip to content

Commit 6c266cf

Browse files
committed
Update code format
1 parent 986b414 commit 6c266cf

10 files changed

Lines changed: 25 additions & 21 deletions

File tree

include/phasar/ControlFlow/SparseCFGBase.h

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,10 @@ template <typename Derived> class SparseCFGBase : public CFGBase<Derived> {
3434

3535
template <typename ICF, typename Domain>
3636
// NOLINTNEXTLINE(readability-identifier-naming)
37-
constexpr bool is_sparse_cfg_v = is_crtp_base_of_v<SparseCFGBase, ICF>
38-
&&std::is_same_v<typename ICF::n_t, typename Domain::n_t>
39-
&&std::is_same_v<typename ICF::f_t, typename Domain::f_t>;
37+
constexpr bool is_sparse_cfg_v =
38+
is_crtp_base_of_v<SparseCFGBase, ICF> &&
39+
std::is_same_v<typename ICF::n_t, typename Domain::n_t> &&
40+
std::is_same_v<typename ICF::f_t, typename Domain::f_t>;
4041

4142
} // namespace psr
4243

include/phasar/DataFlow/IfdsIde/Solver/FlowEdgeFunctionCache.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -292,8 +292,8 @@ class FlowEdgeFunctionCache {
292292

293293
PHASAR_LOG_LEVEL(DEBUG, "(N) Call Site : " << NToString(CallSite));
294294
PHASAR_LOG_LEVEL(DEBUG, "(N) Ret Site : " << NToString(RetSite));
295-
PHASAR_LOG_LEVEL(DEBUG, "(F) Callee's : "); for (auto callee
296-
: Callees) {
295+
PHASAR_LOG_LEVEL(DEBUG, "(F) Callee's : ");
296+
for (auto callee : Callees) {
297297
PHASAR_LOG_LEVEL(DEBUG, " " << FToString(callee));
298298
};);
299299
auto Key = std::tie(CallSite, RetSite);
@@ -462,8 +462,8 @@ class FlowEdgeFunctionCache {
462462

463463
PHASAR_LOG_LEVEL(DEBUG, "(N) Ret Site : " << NToString(RetSite));
464464
PHASAR_LOG_LEVEL(DEBUG, "(D) Ret Node : " << DToString(RetSiteNode));
465-
PHASAR_LOG_LEVEL(DEBUG, "(F) Callee's : "); for (auto callee
466-
: Callees) {
465+
PHASAR_LOG_LEVEL(DEBUG, "(F) Callee's : ");
466+
for (auto callee : Callees) {
467467
PHASAR_LOG_LEVEL(DEBUG, " " << FToString(callee));
468468
});
469469

include/phasar/DataFlow/IfdsIde/Solver/PathAwareIDESolver.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,11 @@ class PathAwareIDESolver : public IDESolver<AnalysisDomainTy, Container> {
4242
}
4343

4444
[[nodiscard]] const ExplodedSuperGraph<domain_t> &
45-
getExplicitESG() const &noexcept {
45+
getExplicitESG() const & noexcept {
4646
return ESG;
4747
}
4848

49-
[[nodiscard]] ExplodedSuperGraph<domain_t> &&getExplicitESG() &&noexcept {
49+
[[nodiscard]] ExplodedSuperGraph<domain_t> &&getExplicitESG() && noexcept {
5050
return std::move(ESG);
5151
}
5252

include/phasar/DataFlow/IfdsIde/Solver/PathEdge.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ template <typename N, typename D> class PathEdge {
2222

2323
public:
2424
PathEdge(D DSource, N Target,
25-
D DTarget) noexcept(std::is_nothrow_move_constructible_v<N>
26-
&&std::is_nothrow_move_constructible_v<D>)
25+
D DTarget) noexcept(std::is_nothrow_move_constructible_v<N> &&
26+
std::is_nothrow_move_constructible_v<D>)
2727
: DSource(std::move(DSource)), Target(std::move(Target)),
2828
DTarget(std::move(DTarget)) {}
2929

include/phasar/PhasarLLVM/DataFlow/PathSensitivity/Z3BasedPathSensitivityConfig.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,15 @@ struct Z3BasedPathSensitivityConfig
2222
std::optional<z3::expr> AdditionalConstraint;
2323

2424
[[nodiscard]] Z3BasedPathSensitivityConfig
25-
withAdditionalConstraint(const z3::expr &Constr) const &noexcept {
25+
withAdditionalConstraint(const z3::expr &Constr) const & noexcept {
2626
auto Ret = *this;
2727
Ret.AdditionalConstraint =
2828
Ret.AdditionalConstraint ? *Ret.AdditionalConstraint && Constr : Constr;
2929
return Ret;
3030
}
3131

3232
[[nodiscard]] Z3BasedPathSensitivityConfig
33-
withAdditionalConstraint(const z3::expr &Constr) &&noexcept {
33+
withAdditionalConstraint(const z3::expr &Constr) && noexcept {
3434
AdditionalConstraint =
3535
AdditionalConstraint ? *AdditionalConstraint && Constr : Constr;
3636
return std::move(*this);

include/phasar/Utils/Logger.h

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -143,12 +143,15 @@ class Logger final {
143143
#else
144144
#define IS_LOG_ENABLED false
145145
#define IF_LOG_ENABLED_BOOL(condition, computation) \
146-
{}
146+
{ \
147+
}
147148
#define IF_LOG_ENABLED(computation) \
148-
{}
149+
{ \
150+
}
149151
#define IS_LOG_LEVEL_ENABLED(level) false
150152
#define IF_LOG_LEVEL_ENABLED(level, computation) \
151-
{}
153+
{ \
154+
}
152155
#define PHASAR_LOG(computation) (void)0
153156
#define PHASAR_LOG_CAT(cat, message) (void)0
154157
#define PHASAR_LOG_LEVEL_CAT(level, cat, message) (void)0

include/phasar/Utils/Table.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -267,13 +267,13 @@ template <typename R, typename C, typename V> class Table {
267267
}
268268

269269
[[nodiscard]] const std::unordered_map<R, std::unordered_map<C, V>> &
270-
rowMap() const &noexcept {
270+
rowMap() const & noexcept {
271271
// Returns a view that associates each row key with the corresponding map
272272
// from column keys to values.
273273
return Tab;
274274
}
275275
[[nodiscard]] std::unordered_map<R, std::unordered_map<C, V>> &&
276-
rowMap() &&noexcept {
276+
rowMap() && noexcept {
277277
// Returns a view that associates each row key with the corresponding map
278278
// from column keys to values.
279279
return std::move(Tab);

test/llvm_test_code/call_graphs/function_pointer_3.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ int bar(int i) { return 13; }
66
int main() {
77
int (*fptr)();
88
fptr = &foo;
9-
fptr = (int (*)()) & bar;
9+
fptr = (int (*)())&bar;
1010
int result = fptr();
1111
return result;
1212
}

test/llvm_test_code/globals/globals_lca_5.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ Foo foo;
3939

4040
__attribute__((constructor)) void makeGlobalFoo() {
4141
foo = createFoo();
42-
__cxa_atexit((void (*)(void *)) & Foo_dtor, &foo, nullptr);
42+
__cxa_atexit((void (*)(void *))&Foo_dtor, &foo, nullptr);
4343
}
4444

4545
int main() { printf("x: %d\n", foo); }

unittests/Utils/OnTheFlyAnalysisPrinterTest.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ class GroundTruthCollector
2323
public:
2424
// constructor init Groundtruth in each fixture
2525
GroundTruthCollector(llvm::DenseMap<int, std::set<std::string>> &GroundTruth)
26-
: GroundTruth(GroundTruth){};
26+
: GroundTruth(GroundTruth) {};
2727

2828
void findAndRemove(int LeakId, const std::string &LeakedFactId) {
2929

0 commit comments

Comments
 (0)