Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.3.0
rev: v6.0.0
hooks:
- id: trailing-whitespace
exclude: "^.*\\.patch$"
Expand Down
7 changes: 4 additions & 3 deletions include/phasar/ControlFlow/SparseCFGBase.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,10 @@ template <typename Derived> class SparseCFGBase : public CFGBase<Derived> {

template <typename ICF, typename Domain>
// NOLINTNEXTLINE(readability-identifier-naming)
constexpr bool is_sparse_cfg_v = is_crtp_base_of_v<SparseCFGBase, ICF>
&&std::is_same_v<typename ICF::n_t, typename Domain::n_t>
&&std::is_same_v<typename ICF::f_t, typename Domain::f_t>;
constexpr bool is_sparse_cfg_v =
is_crtp_base_of_v<SparseCFGBase, ICF> &&
std::is_same_v<typename ICF::n_t, typename Domain::n_t> &&
std::is_same_v<typename ICF::f_t, typename Domain::f_t>;

} // namespace psr

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -292,8 +292,8 @@ class FlowEdgeFunctionCache {

PHASAR_LOG_LEVEL(DEBUG, "(N) Call Site : " << NToString(CallSite));
PHASAR_LOG_LEVEL(DEBUG, "(N) Ret Site : " << NToString(RetSite));
PHASAR_LOG_LEVEL(DEBUG, "(F) Callee's : "); for (auto callee
: Callees) {
PHASAR_LOG_LEVEL(DEBUG, "(F) Callee's : ");
for (auto callee : Callees) {
PHASAR_LOG_LEVEL(DEBUG, " " << FToString(callee));
};);
auto Key = std::tie(CallSite, RetSite);
Expand Down Expand Up @@ -462,8 +462,8 @@ class FlowEdgeFunctionCache {

PHASAR_LOG_LEVEL(DEBUG, "(N) Ret Site : " << NToString(RetSite));
PHASAR_LOG_LEVEL(DEBUG, "(D) Ret Node : " << DToString(RetSiteNode));
PHASAR_LOG_LEVEL(DEBUG, "(F) Callee's : "); for (auto callee
: Callees) {
PHASAR_LOG_LEVEL(DEBUG, "(F) Callee's : ");
for (auto callee : Callees) {
PHASAR_LOG_LEVEL(DEBUG, " " << FToString(callee));
});

Expand Down
4 changes: 2 additions & 2 deletions include/phasar/DataFlow/IfdsIde/Solver/PathAwareIDESolver.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,11 @@ class PathAwareIDESolver : public IDESolver<AnalysisDomainTy, Container> {
}

[[nodiscard]] const ExplodedSuperGraph<domain_t> &
getExplicitESG() const &noexcept {
getExplicitESG() const & noexcept {
return ESG;
}

[[nodiscard]] ExplodedSuperGraph<domain_t> &&getExplicitESG() &&noexcept {
[[nodiscard]] ExplodedSuperGraph<domain_t> &&getExplicitESG() && noexcept {
return std::move(ESG);
}

Expand Down
4 changes: 2 additions & 2 deletions include/phasar/DataFlow/IfdsIde/Solver/PathEdge.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ template <typename N, typename D> class PathEdge {

public:
PathEdge(D DSource, N Target,
D DTarget) noexcept(std::is_nothrow_move_constructible_v<N>
&&std::is_nothrow_move_constructible_v<D>)
D DTarget) noexcept(std::is_nothrow_move_constructible_v<N> &&
std::is_nothrow_move_constructible_v<D>)
: DSource(std::move(DSource)), Target(std::move(Target)),
DTarget(std::move(DTarget)) {}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,15 @@ struct Z3BasedPathSensitivityConfig
std::optional<z3::expr> AdditionalConstraint;

[[nodiscard]] Z3BasedPathSensitivityConfig
withAdditionalConstraint(const z3::expr &Constr) const &noexcept {
withAdditionalConstraint(const z3::expr &Constr) const & noexcept {
auto Ret = *this;
Ret.AdditionalConstraint =
Ret.AdditionalConstraint ? *Ret.AdditionalConstraint && Constr : Constr;
return Ret;
}

[[nodiscard]] Z3BasedPathSensitivityConfig
withAdditionalConstraint(const z3::expr &Constr) &&noexcept {
withAdditionalConstraint(const z3::expr &Constr) && noexcept {
AdditionalConstraint =
AdditionalConstraint ? *AdditionalConstraint && Constr : Constr;
return std::move(*this);
Expand Down
9 changes: 6 additions & 3 deletions include/phasar/Utils/Logger.h
Original file line number Diff line number Diff line change
Expand Up @@ -143,12 +143,15 @@ class Logger final {
#else
#define IS_LOG_ENABLED false
#define IF_LOG_ENABLED_BOOL(condition, computation) \
{}
{ \
}
#define IF_LOG_ENABLED(computation) \
{}
{ \
}
#define IS_LOG_LEVEL_ENABLED(level) false
#define IF_LOG_LEVEL_ENABLED(level, computation) \
{}
{ \
}
#define PHASAR_LOG(computation) (void)0
#define PHASAR_LOG_CAT(cat, message) (void)0
#define PHASAR_LOG_LEVEL_CAT(level, cat, message) (void)0
Expand Down
4 changes: 2 additions & 2 deletions include/phasar/Utils/Table.h
Original file line number Diff line number Diff line change
Expand Up @@ -267,13 +267,13 @@ template <typename R, typename C, typename V> class Table {
}

[[nodiscard]] const std::unordered_map<R, std::unordered_map<C, V>> &
rowMap() const &noexcept {
rowMap() const & noexcept {
// Returns a view that associates each row key with the corresponding map
// from column keys to values.
return Tab;
}
[[nodiscard]] std::unordered_map<R, std::unordered_map<C, V>> &&
rowMap() &&noexcept {
rowMap() && noexcept {
// Returns a view that associates each row key with the corresponding map
// from column keys to values.
return std::move(Tab);
Expand Down
2 changes: 1 addition & 1 deletion test/llvm_test_code/call_graphs/function_pointer_3.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ int bar(int i) { return 13; }
int main() {
int (*fptr)();
fptr = &foo;
fptr = (int (*)()) & bar;
fptr = (int (*)())&bar;
int result = fptr();
return result;
}
2 changes: 1 addition & 1 deletion test/llvm_test_code/globals/globals_lca_5.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ Foo foo;

__attribute__((constructor)) void makeGlobalFoo() {
foo = createFoo();
__cxa_atexit((void (*)(void *)) & Foo_dtor, &foo, nullptr);
__cxa_atexit((void (*)(void *))&Foo_dtor, &foo, nullptr);
}

int main() { printf("x: %d\n", foo); }
2 changes: 1 addition & 1 deletion unittests/Utils/OnTheFlyAnalysisPrinterTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class GroundTruthCollector
public:
// constructor init Groundtruth in each fixture
GroundTruthCollector(llvm::DenseMap<int, std::set<std::string>> &GroundTruth)
: GroundTruth(GroundTruth){};
: GroundTruth(GroundTruth) {};

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

Expand Down
Loading