Give ObjCClassRef cursors a sane representation, which is encapsulated
in CXCursor.cpp. With this sane representation, fix the class
reference that is part of Objective-C category declarations so that
the cursor's location matches up with the reference, not the class
being referred to.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93640 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/tools/CIndex/CXCursor.h b/tools/CIndex/CXCursor.h
index 26bbc7d..ff474ed 100644
--- a/tools/CIndex/CXCursor.h
+++ b/tools/CIndex/CXCursor.h
@@ -50,11 +50,18 @@
 std::pair<ObjCProtocolDecl *, SourceLocation> 
   getCursorObjCProtocolRef(CXCursor C);
 
+/// \brief Create an Objective-C class reference at the given location.
+CXCursor MakeCursorObjCClassRef(ObjCInterfaceDecl *Class, SourceLocation Loc);
+
+/// \brief Unpack an ObjCClassRef cursor into the class it references
+/// and optionally the location where the reference occurred.
+std::pair<ObjCInterfaceDecl *, SourceLocation> 
+  getCursorObjCClassRef(CXCursor C);
+
 Decl *getCursorDecl(CXCursor Cursor);
 Expr *getCursorExpr(CXCursor Cursor);
 Stmt *getCursorStmt(CXCursor Cursor);
 Decl *getCursorReferringDecl(CXCursor Cursor);
-NamedDecl *getCursorInterfaceParent(CXCursor Cursor);
   
 bool operator==(CXCursor X, CXCursor Y);