aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFariborz Jahanian <fjahanian@apple.com>2008-12-17 18:25:24 +0000
committerFariborz Jahanian <fjahanian@apple.com>2008-12-17 18:25:24 +0000
commitc9ca4a23b1d2a2d923b283e7022a39c7aa5e87b2 (patch)
tree6d4653e597878ddf74ef87af6081f69a99b4571d
parent0b65b1dc5abed26492740206c24e86271c9dca6b (diff)
Added comment to Steve's patch to clarify the case.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61144 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/AST/DeclObjC.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/AST/DeclObjC.cpp b/lib/AST/DeclObjC.cpp
index 12c224501c..a7e878fc24 100644
--- a/lib/AST/DeclObjC.cpp
+++ b/lib/AST/DeclObjC.cpp
@@ -369,6 +369,9 @@ void ObjCInterfaceDecl::addInstanceVariablesToClass(ObjCIvarDecl **ivars,
///
FieldDecl *ObjCInterfaceDecl::lookupFieldDeclForIvar(ASTContext &Context,
const ObjCIvarDecl *ivar) {
+ /* When a super class's ivar is referenced in the subclass method with no ivar
+ of its own, record for the sub-class is not built yet. Build it lazily
+ here. */
if (!RecordForDecl)
addRecordToClass(Context);
assert(RecordForDecl && "lookupFieldDeclForIvar no storage for class");