Skip to content

Commit 034a7b6

Browse files
committed
[ValueLattice] Fix uninitialized-value after D79036
Many check-clang-codegen tests failed.
1 parent d041477 commit 034a7b6

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

llvm/include/llvm/Analysis/ValueLattice.h

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -142,11 +142,12 @@ class ValueLatticeElement {
142142
};
143143

144144
// ConstVal and Range are initialized on-demand.
145-
ValueLatticeElement() : Tag(unknown) {}
145+
ValueLatticeElement() : Tag(unknown), NumRangeExtensions(0) {}
146146

147147
~ValueLatticeElement() { destroy(); }
148148

149-
ValueLatticeElement(const ValueLatticeElement &Other) : Tag(Other.Tag) {
149+
ValueLatticeElement(const ValueLatticeElement &Other)
150+
: Tag(Other.Tag), NumRangeExtensions(0) {
150151
switch (Other.Tag) {
151152
case constantrange:
152153
case constantrange_including_undef:
@@ -164,7 +165,8 @@ class ValueLatticeElement {
164165
}
165166
}
166167

167-
ValueLatticeElement(ValueLatticeElement &&Other) : Tag(Other.Tag) {
168+
ValueLatticeElement(ValueLatticeElement &&Other)
169+
: Tag(Other.Tag), NumRangeExtensions(0) {
168170
switch (Other.Tag) {
169171
case constantrange:
170172
case constantrange_including_undef:

0 commit comments

Comments
 (0)