From: Sean Callanan Date: Thu, 3 Mar 2016 02:22:05 +0000 (+0000) Subject: Caught and fixed a typo in r262572. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5f4fa93f22cae6988388e2fa7235dc1d8836af56;p=clang Caught and fixed a typo in r262572. I should have checked and imported D's in-class initializer. Instead I accidentally used ToField's in-class initializer, which is always NULL so ToField will never get one. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@262576 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/AST/ASTImporter.cpp b/lib/AST/ASTImporter.cpp index a21a7e56fc..c3d39b9b75 100644 --- a/lib/AST/ASTImporter.cpp +++ b/lib/AST/ASTImporter.cpp @@ -3038,7 +3038,7 @@ Decl *ASTNodeImporter::VisitFieldDecl(FieldDecl *D) { D->getInClassInitStyle()); ToField->setAccess(D->getAccess()); ToField->setLexicalDeclContext(LexicalDC); - if (Expr *FromInitializer = ToField->getInClassInitializer()) { + if (Expr *FromInitializer = D->getInClassInitializer()) { Expr *ToInitializer = Importer.Import(FromInitializer); if (ToInitializer) ToField->setInClassInitializer(ToInitializer);