[clang] d0f3c82 - Fix uninitialized variable warnings. NFCI.
Simon Pilgrim via cfe-commits
cfe-commits at lists.llvm.org
Sat Nov 2 11:27:53 PDT 2019
Author: Simon Pilgrim
Date: 2019-11-02T18:03:21Z
New Revision: d0f3c822160e36e10588bc86dabde6ab8d63cf10
URL: https://github.com/llvm/llvm-project/commit/d0f3c822160e36e10588bc86dabde6ab8d63cf10
DIFF: https://github.com/llvm/llvm-project/commit/d0f3c822160e36e10588bc86dabde6ab8d63cf10.diff
LOG: Fix uninitialized variable warnings. NFCI.
Added:
Modified:
clang/utils/TableGen/ClangDiagnosticsEmitter.cpp
Removed:
################################################################################
diff --git a/clang/utils/TableGen/ClangDiagnosticsEmitter.cpp b/clang/utils/TableGen/ClangDiagnosticsEmitter.cpp
index 778375010041..f694c3e4380a 100644
--- a/clang/utils/TableGen/ClangDiagnosticsEmitter.cpp
+++ b/clang/utils/TableGen/ClangDiagnosticsEmitter.cpp
@@ -134,7 +134,7 @@ namespace {
const Record *ExplicitDef;
- GroupInfo() : ExplicitDef(nullptr) {}
+ GroupInfo() : IDNo(0), ExplicitDef(nullptr) {}
};
} // end anonymous namespace.
@@ -554,7 +554,7 @@ struct SelectPiece : Piece {
ModifierType ModKind;
std::vector<Piece *> Options;
- int Index;
+ int Index = 0;
static bool classof(const Piece *P) {
return P->getPieceClass() == SelectPieceClass ||
@@ -566,7 +566,7 @@ struct PluralPiece : SelectPiece {
PluralPiece() : SelectPiece(PluralPieceClass, MT_Plural) {}
std::vector<Piece *> OptionPrefixes;
- int Index;
+ int Index = 0;
static bool classof(const Piece *P) {
return P->getPieceClass() == PluralPieceClass;
More information about the cfe-commits
mailing list