diff options
Diffstat (limited to 'tools/CIndex/CXCursor.h')
-rw-r--r-- | tools/CIndex/CXCursor.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tools/CIndex/CXCursor.h b/tools/CIndex/CXCursor.h index 5f81c8a173..546dd7f485 100644 --- a/tools/CIndex/CXCursor.h +++ b/tools/CIndex/CXCursor.h @@ -28,6 +28,7 @@ class NamedDecl; class ObjCInterfaceDecl; class ObjCProtocolDecl; class Stmt; +class TypeDecl; namespace cxcursor { @@ -63,6 +64,13 @@ CXCursor MakeCursorObjCClassRef(ObjCInterfaceDecl *Class, SourceLocation Loc, std::pair<ObjCInterfaceDecl *, SourceLocation> getCursorObjCClassRef(CXCursor C); +/// \brief Create a type reference at the given location. +CXCursor MakeCursorTypeRef(TypeDecl *Type, SourceLocation Loc, ASTUnit *TU); + +/// \brief Unpack a TypeRef cursor into the class it references +/// and optionally the location where the reference occurred. +std::pair<TypeDecl *, SourceLocation> getCursorTypeRef(CXCursor C); + Decl *getCursorDecl(CXCursor Cursor); Expr *getCursorExpr(CXCursor Cursor); Stmt *getCursorStmt(CXCursor Cursor); |