зеркало из https://github.com/microsoft/clang.git
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:
Родитель
af79c1156a
Коммит
84472a897a
|
@ -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;
|
||||
}
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
|
Загрузка…
Ссылка в новой задаче