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.

<rdar://problem/24943405>

llvm-svn: 262576
This commit is contained in:
Sean Callanan 2016-03-03 02:22:05 +00:00
parent 153e4b0f11
commit 3a83ea7ec6
1 changed files with 1 additions and 1 deletions

View File

@ -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);