 |
|
 |
|
| Files: |
1 |
|
Branches Taken: |
0.0% |
0 / 0 |
| Generated: |
2010-02-10 01:31 |
|
Branches Executed: |
0.0% |
0 / 0 |
| |
|
Line Coverage: |
0.0% |
0 / 2 |
| |
 |
|
 |
1 : //===- CXCursor.h - Routines for manipulating CXCursors -------------------===//
2 : //
3 : // The LLVM Compiler Infrastructure
4 : //
5 : // This file is distributed under the University of Illinois Open Source
6 : // License. See LICENSE.TXT for details.
7 : //
8 : //===----------------------------------------------------------------------===//
9 : //
10 : // This file defines routines for manipulating CXCursors.
11 : //
12 : //===----------------------------------------------------------------------===//
13 :
14 : #ifndef LLVM_CLANG_CXCURSOR_H
15 : #define LLVM_CLANG_CXCURSOR_H
16 :
17 : #include "clang-c/Index.h"
18 : #include "clang/Basic/SourceLocation.h"
19 : #include <utility>
20 :
21 : namespace clang {
22 :
23 : class ASTContext;
24 : class ASTUnit;
25 : class Decl;
26 : class Expr;
27 : class NamedDecl;
28 : class ObjCInterfaceDecl;
29 : class ObjCProtocolDecl;
30 : class Stmt;
31 : class TypeDecl;
32 :
33 : namespace cxcursor {
34 :
35 : CXCursor MakeCXCursorInvalid(CXCursorKind K);
36 : CXCursor MakeCXCursor(clang::Stmt *S, clang::Decl *Parent, ASTUnit *TU);
37 : CXCursor MakeCXCursor(clang::Decl *D, ASTUnit *TU);
38 :
39 : /// \brief Create an Objective-C superclass reference at the given location.
40 : CXCursor MakeCursorObjCSuperClassRef(ObjCInterfaceDecl *Super,
41 : SourceLocation Loc,
42 : ASTUnit *TU);
43 :
44 : /// \brief Unpack an ObjCSuperClassRef cursor into the interface it references
45 : /// and optionally the location where the reference occurred.
46 : std::pair<ObjCInterfaceDecl *, SourceLocation>
47 : getCursorObjCSuperClassRef(CXCursor C);
48 :
49 : /// \brief Create an Objective-C protocol reference at the given location.
50 : CXCursor MakeCursorObjCProtocolRef(ObjCProtocolDecl *Proto, SourceLocation Loc,
51 : ASTUnit *TU);
52 :
53 : /// \brief Unpack an ObjCProtocolRef cursor into the protocol it references
54 : /// and optionally the location where the reference occurred.
55 : std::pair<ObjCProtocolDecl *, SourceLocation>
56 : getCursorObjCProtocolRef(CXCursor C);
57 :
58 : /// \brief Create an Objective-C class reference at the given location.
59 : CXCursor MakeCursorObjCClassRef(ObjCInterfaceDecl *Class, SourceLocation Loc,
60 : ASTUnit *TU);
61 :
62 : /// \brief Unpack an ObjCClassRef cursor into the class it references
63 : /// and optionally the location where the reference occurred.
64 : std::pair<ObjCInterfaceDecl *, SourceLocation>
65 : getCursorObjCClassRef(CXCursor C);
66 :
67 : /// \brief Create a type reference at the given location.
68 : CXCursor MakeCursorTypeRef(TypeDecl *Type, SourceLocation Loc, ASTUnit *TU);
69 :
70 : /// \brief Unpack a TypeRef cursor into the class it references
71 : /// and optionally the location where the reference occurred.
72 : std::pair<TypeDecl *, SourceLocation> getCursorTypeRef(CXCursor C);
73 :
74 : Decl *getCursorDecl(CXCursor Cursor);
75 : Expr *getCursorExpr(CXCursor Cursor);
76 : Stmt *getCursorStmt(CXCursor Cursor);
77 : ASTContext &getCursorContext(CXCursor Cursor);
78 : ASTUnit *getCursorASTUnit(CXCursor Cursor);
79 :
80 : bool operator==(CXCursor X, CXCursor Y);
81 :
82 0: inline bool operator!=(CXCursor X, CXCursor Y) {
83 0: return !(X == Y);
84 : }
85 :
86 : }} // end namespace: clang::cxcursor
87 :
88 : #endif
Generated: 2010-02-10 01:31 by zcov