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
7 changes: 7 additions & 0 deletions src/analysis/lattices/flat.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,13 @@ struct Flat {
bool isTop() const noexcept { return std::get_if<Top>(this); }
const T* getVal() const noexcept { return std::get_if<T>(this); }
T* getVal() noexcept { return std::get_if<T>(this); }
bool operator==(const Element& other) const noexcept {
return ((isBottom() && other.isBottom()) || (isTop() && other.isTop()) ||
(getVal() && other.getVal() && *getVal() == *other.getVal()));
}
bool operator!=(const Element& other) const noexcept {
return !(*this == other);
}
};

Element getBottom() const noexcept { return Element{Bot{}}; }
Expand Down
Loading