Skip to content

Commit

Permalink
Make killAllFlows() kill flows (#682)
Browse files Browse the repository at this point in the history
  • Loading branch information
fabianbs96 authored Nov 25, 2023
1 parent 3aca432 commit fc14480
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions include/phasar/DataFlow/IfdsIde/FlowFunctions.h
Original file line number Diff line number Diff line change
Expand Up @@ -107,14 +107,14 @@ class ZeroedFlowFunction : public FlowFunction<D, Container> {

public:
ZeroedFlowFunction(FlowFunctionPtrType FF, D ZV)
: Delegate(std::move(FF)), ZeroValue(ZV) {}
: Delegate(std::move(FF)), ZeroValue(std::move(ZV)) {}
container_type computeTargets(D Source) override {
if (Source == ZeroValue) {
container_type Result = Delegate->computeTargets(Source);
Result.insert(ZeroValue);
return Result;
}
return Delegate->computeTargets(Source);
return Delegate->computeTargets(std::move(Source));
}

private:
Expand Down Expand Up @@ -423,9 +423,7 @@ template <typename D, typename Container> class FlowFunctionTemplates {
///
static auto killAllFlows() {
struct KillAllFF final : public FlowFunction<d_t, container_type> {
Container computeTargets(d_t Source) override {
return {std::move(Source)};
}
Container computeTargets(d_t /*Source*/) override { return Container(); }
};
static auto TheKillAllFlow = std::make_shared<KillAllFF>();

Expand Down

0 comments on commit fc14480

Please sign in to comment.