Implement FIXME discoved by <rdar://problem/5874876> Rewriter: Explicit ivar refs outside a method are being rewritten

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49932 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Steve Naroff 2008-04-18 21:55:08 +00:00
Родитель af79c1156a
Коммит 84472a897a
1 изменённых файлов: 5 добавлений и 6 удалений

Просмотреть файл

@ -846,13 +846,12 @@ Stmt *RewriteObjC::RewriteObjCIvarRefExpr(ObjCIvarRefExpr *IV) {
}
}
}
} else { // we are outside a method.
if (IV->isFreeIvar())
assert(1 && "Cannot have a free standing ivar outside a method");
// Explicit ivar refs do not need to be rewritten. Do nothing.
}
// FIXME: Implement public ivar access from a function.
Expr *Replacement = new MemberExpr(IV->getBase(), true, D,
IV->getLocation(), D->getType());
ReplaceStmt(IV, Replacement);
delete IV;
return Replacement;
return IV;
}
//===----------------------------------------------------------------------===//