]> granicus.if.org Git - clang/commitdiff
Fix uninitialized variable warnings. NFCI.
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Tue, 15 Oct 2019 10:23:05 +0000 (10:23 +0000)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Tue, 15 Oct 2019 10:23:05 +0000 (10:23 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@374876 91177308-0d34-0410-b5e6-96231b3b80d8

lib/AST/ASTImporter.cpp

index 20539feb44860b6f0be4c757436d3f0f51d53b52..a549cf9f899ee12a2eae5158c4fc80a69732885b 100644 (file)
@@ -2579,10 +2579,10 @@ ExpectedDecl ASTNodeImporter::VisitRecordDecl(RecordDecl *D) {
   }
 
   // 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)