r374876 - Fix uninitialized variable warnings. NFCI.

Simon Pilgrim via cfe-commits cfe-commits at lists.llvm.org
Tue Oct 15 03:23:05 PDT 2019


Author: rksimon
Date: Tue Oct 15 03:23:05 2019
New Revision: 374876

URL: http://llvm.org/viewvc/llvm-project?rev=374876&view=rev
Log:
Fix uninitialized variable warnings. NFCI.

Modified:
    cfe/trunk/lib/AST/ASTImporter.cpp

Modified: cfe/trunk/lib/AST/ASTImporter.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/ASTImporter.cpp?rev=374876&r1=374875&r2=374876&view=diff
==============================================================================
--- cfe/trunk/lib/AST/ASTImporter.cpp (original)
+++ cfe/trunk/lib/AST/ASTImporter.cpp Tue Oct 15 03:23:05 2019
@@ -2579,10 +2579,10 @@ ExpectedDecl ASTNodeImporter::VisitRecor
   }
 
   // Import the major distinguishing characteristics of this record.
-  DeclContext *DC, *LexicalDC;
+  DeclContext *DC = nullptr, *LexicalDC = nullptr;
   DeclarationName Name;
   SourceLocation Loc;
-  NamedDecl *ToD;
+  NamedDecl *ToD = nullptr;
   if (Error Err = ImportDeclParts(D, DC, LexicalDC, Name, ToD, Loc))
     return std::move(Err);
   if (ToD)




More information about the cfe-commits mailing list