Skip to content

Commit

Permalink
Fix loc_t operator< when parent is nullptr (#4798)
Browse files Browse the repository at this point in the history
Signed-off-by: Kyle Cripps <kyle@pensando.io>
  • Loading branch information
kfcripps committed Jul 12, 2024
1 parent f24aacc commit a258b7e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion midend/def_use.h
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ class ComputeDefUse : public Inspector,
const loc_t *parent;
bool operator<(const loc_t &a) const {
if (node != a.node) return node->id < a.node->id;
if (!a.parent) return parent != nullptr;
if (!parent || !a.parent) return parent != nullptr;
return *parent < *a.parent;
}
template <class T>
Expand Down

0 comments on commit a258b7e

Please sign in to comment.