Skip to content

Commit

Permalink
[IntervalTree] Initialize find_iterator::Point
Browse files Browse the repository at this point in the history
There was initially a msan report for use-of-uninitialized value due to
a bug in https://reviews.llvm.org/D138526. find_iterator::Point is
uninitialized for the default constructor of find_iterator, which is
used by IntervalTree::end. This change is not required, but its good
practice to make sure all class members are initialized.

Differential Revision: https://reviews.llvm.org/D149698
  • Loading branch information
caojoshua committed May 14, 2023
1 parent 9400c64 commit c674125
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion llvm/include/llvm/ADT/IntervalTree.h
Original file line number Diff line number Diff line change
Expand Up @@ -463,7 +463,7 @@ class IntervalTree {
// Current node and index while traversing the intervals that contain
// the reference point.
IntervalNode *Node = nullptr;
PointType Point;
PointType Point = {};
unsigned Index = 0;

// For the current node, check if we have intervals that contain the
Expand Down

0 comments on commit c674125

Please sign in to comment.