diff options
| author | Douglas Gregor <dgregor@apple.com> | 2010-11-17 01:03:52 +0000 |
|---|---|---|
| committer | Douglas Gregor <dgregor@apple.com> | 2010-11-17 01:03:52 +0000 |
| commit | b1b71e50a0767f429122c92d38c9e227472fb26d (patch) | |
| tree | 8e5e06b6726aae03207a2a29b44301fd7d420163 /clang/tools | |
| parent | bcc230a7653624d5e2854e4718dbf9fe07aacd9f (diff) | |
| download | bcm5719-llvm-b1b71e50a0767f429122c92d38c9e227472fb26d.tar.gz bcm5719-llvm-b1b71e50a0767f429122c92d38c9e227472fb26d.zip | |
For an Objective-C @synthesize statement, e.g.,
@synthesize foo = _foo;
keep track of the location of the ivar ("_foo"). Teach libclang to
visit the ivar as a member reference.
llvm-svn: 119447
Diffstat (limited to 'clang/tools')
| -rw-r--r-- | clang/tools/libclang/CIndex.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/clang/tools/libclang/CIndex.cpp b/clang/tools/libclang/CIndex.cpp index f4e355707ca..17e2c7c5c7e 100644 --- a/clang/tools/libclang/CIndex.cpp +++ b/clang/tools/libclang/CIndex.cpp @@ -293,6 +293,7 @@ public: // FIXME: ObjCCompatibleAliasDecl requires aliased-class locations. bool VisitObjCForwardProtocolDecl(ObjCForwardProtocolDecl *D); bool VisitObjCClassDecl(ObjCClassDecl *D); + bool VisitObjCPropertyImplDecl(ObjCPropertyImplDecl *PD); bool VisitLinkageSpecDecl(LinkageSpecDecl *D); bool VisitNamespaceDecl(NamespaceDecl *D); bool VisitNamespaceAliasDecl(NamespaceAliasDecl *D); @@ -1044,6 +1045,13 @@ bool CursorVisitor::VisitObjCClassDecl(ObjCClassDecl *D) { return false; } +bool CursorVisitor::VisitObjCPropertyImplDecl(ObjCPropertyImplDecl *PD) { + if (ObjCIvarDecl *Ivar = PD->getPropertyIvarDecl()) + return Visit(MakeCursorMemberRef(Ivar, PD->getPropertyIvarDeclLoc(), TU)); + + return false; +} + bool CursorVisitor::VisitNamespaceDecl(NamespaceDecl *D) { return VisitDeclContext(D); } |

