Skip to content

Commit d0f3c82

Browse files
committed
Fix uninitialized variable warnings. NFCI.
1 parent 08e5938 commit d0f3c82

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

clang/utils/TableGen/ClangDiagnosticsEmitter.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ namespace {
134134

135135
const Record *ExplicitDef;
136136

137-
GroupInfo() : ExplicitDef(nullptr) {}
137+
GroupInfo() : IDNo(0), ExplicitDef(nullptr) {}
138138
};
139139
} // end anonymous namespace.
140140

@@ -554,7 +554,7 @@ struct SelectPiece : Piece {
554554

555555
ModifierType ModKind;
556556
std::vector<Piece *> Options;
557-
int Index;
557+
int Index = 0;
558558

559559
static bool classof(const Piece *P) {
560560
return P->getPieceClass() == SelectPieceClass ||
@@ -566,7 +566,7 @@ struct PluralPiece : SelectPiece {
566566
PluralPiece() : SelectPiece(PluralPieceClass, MT_Plural) {}
567567

568568
std::vector<Piece *> OptionPrefixes;
569-
int Index;
569+
int Index = 0;
570570

571571
static bool classof(const Piece *P) {
572572
return P->getPieceClass() == PluralPieceClass;

0 commit comments

Comments
 (0)