diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2011-09-13 18:49:56 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2011-09-13 18:49:56 +0000 |
commit | 221d5a5005b3dbde50b8b0a40bb5c5e6da8c1173 (patch) | |
tree | 7a14aadbd3843ac6e21c80281cbb2d89427b6252 /tools/libclang/CIndex.cpp | |
parent | 18aa2ff4641847d7f8866e8c5912d4d0ddb858ce (diff) |
[libclang] Correct annotation and taking of cursor for objc class references
inside the IBOutletCollection attribute.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139621 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/libclang/CIndex.cpp')
-rw-r--r-- | tools/libclang/CIndex.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/tools/libclang/CIndex.cpp b/tools/libclang/CIndex.cpp index 40b21940af..2f8db5dfce 100644 --- a/tools/libclang/CIndex.cpp +++ b/tools/libclang/CIndex.cpp @@ -559,7 +559,15 @@ bool CursorVisitor::VisitChildren(CXCursor Cursor) { } } } - + + if (Cursor.kind == CXCursor_IBOutletCollectionAttr) { + IBOutletCollectionAttr *A = + cast<IBOutletCollectionAttr>(cxcursor::getCursorAttr(Cursor)); + if (const ObjCInterfaceType *InterT = A->getInterface()->getAs<ObjCInterfaceType>()) + return Visit(cxcursor::MakeCursorObjCClassRef(InterT->getInterface(), + A->getInterfaceLoc(), TU)); + } + // Nothing to visit at the moment. return false; } |