Skip to content

Commit fc14480

Browse files
authored
Make killAllFlows() kill flows (#682)
1 parent 3aca432 commit fc14480

1 file changed

Lines changed: 3 additions & 5 deletions

File tree

include/phasar/DataFlow/IfdsIde/FlowFunctions.h

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -107,14 +107,14 @@ class ZeroedFlowFunction : public FlowFunction<D, Container> {
107107

108108
public:
109109
ZeroedFlowFunction(FlowFunctionPtrType FF, D ZV)
110-
: Delegate(std::move(FF)), ZeroValue(ZV) {}
110+
: Delegate(std::move(FF)), ZeroValue(std::move(ZV)) {}
111111
container_type computeTargets(D Source) override {
112112
if (Source == ZeroValue) {
113113
container_type Result = Delegate->computeTargets(Source);
114114
Result.insert(ZeroValue);
115115
return Result;
116116
}
117-
return Delegate->computeTargets(Source);
117+
return Delegate->computeTargets(std::move(Source));
118118
}
119119

120120
private:
@@ -423,9 +423,7 @@ template <typename D, typename Container> class FlowFunctionTemplates {
423423
///
424424
static auto killAllFlows() {
425425
struct KillAllFF final : public FlowFunction<d_t, container_type> {
426-
Container computeTargets(d_t Source) override {
427-
return {std::move(Source)};
428-
}
426+
Container computeTargets(d_t /*Source*/) override { return Container(); }
429427
};
430428
static auto TheKillAllFlow = std::make_shared<KillAllFF>();
431429

0 commit comments

Comments
 (0)