[llvm] b0d0928 - YAMLParser - fix SimpleKey uninitialized variable warnings. NFCI.

Simon Pilgrim via llvm-commits llvm-commits at lists.llvm.org
Sat Nov 9 14:16:48 PST 2019


Author: Simon Pilgrim
Date: 2019-11-09T22:11:50Z
New Revision: b0d0928241a31b4da5cd6b22baba4c1b55211b4a

URL: https://github.com/llvm/llvm-project/commit/b0d0928241a31b4da5cd6b22baba4c1b55211b4a
DIFF: https://github.com/llvm/llvm-project/commit/b0d0928241a31b4da5cd6b22baba4c1b55211b4a.diff

LOG: YAMLParser - fix SimpleKey uninitialized variable warnings. NFCI.

Added: 
    

Modified: 
    llvm/lib/Support/YAMLParser.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Support/YAMLParser.cpp b/llvm/lib/Support/YAMLParser.cpp
index 95637bc36b42..333648dae2b9 100644
--- a/llvm/lib/Support/YAMLParser.cpp
+++ b/llvm/lib/Support/YAMLParser.cpp
@@ -178,10 +178,10 @@ namespace {
 /// others) before the SimpleKey's Tok.
 struct SimpleKey {
   TokenQueueT::iterator Tok;
-  unsigned Column;
-  unsigned Line;
-  unsigned FlowLevel;
-  bool IsRequired;
+  unsigned Column = 0;
+  unsigned Line = 0;
+  unsigned FlowLevel = 0;
+  bool IsRequired = false;
 
   bool operator ==(const SimpleKey &Other) {
     return Tok == Other.Tok;


        


More information about the llvm-commits mailing list