summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST
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
commit7ca027a1017253cca7d479c2b5e6b4a0aa05067f (patch)
tree751e10fdebfeceb9ed77ccaa8824cb535354c8fc /clang/lib/AST
parent29f390b5075adeaa821e8675d73c2743564a2d9c (diff)
downloadbcm5719-llvm-7ca027a1017253cca7d479c2b5e6b4a0aa05067f.tar.gz
bcm5719-llvm-7ca027a1017253cca7d479c2b5e6b4a0aa05067f.zip
Added comment to Steve's patch to clarify the case.
llvm-svn: 61144
Diffstat (limited to 'clang/lib/AST')
-rw-r--r--clang/lib/AST/DeclObjC.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/lib/AST/DeclObjC.cpp b/clang/lib/AST/DeclObjC.cpp
index 12c224501c6..a7e878fc24f 100644
--- a/clang/lib/AST/DeclObjC.cpp
+++ b/clang/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");
OpenPOWER on IntegriCloud