Ted Kremenek | 87553c4 | 2010-01-15 20:35:54 +0000 | [diff] [blame] | 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 | |
| 19 | namespace clang { |
| 20 | |
| 21 | class Decl; |
Douglas Gregor | c58d05b | 2010-01-15 21:56:13 +0000 | [diff] [blame^] | 22 | class Expr; |
| 23 | class NamedDecl; |
Ted Kremenek | 87553c4 | 2010-01-15 20:35:54 +0000 | [diff] [blame] | 24 | class Stmt; |
| 25 | |
| 26 | namespace cxcursor { |
| 27 | |
| 28 | CXCursor MakeCXCursor(CXCursorKind K, clang::Decl *D); |
| 29 | CXCursor MakeCXCursor(CXCursorKind K, clang::Decl *D, clang::Stmt *S); |
| 30 | |
Douglas Gregor | c58d05b | 2010-01-15 21:56:13 +0000 | [diff] [blame^] | 31 | Decl *getCursorDecl(CXCursor Cursor); |
| 32 | Expr *getCursorExpr(CXCursor Cursor); |
| 33 | Stmt *getCursorStmt(CXCursor Cursor); |
| 34 | Decl *getCursorReferringDecl(CXCursor Cursor); |
| 35 | NamedDecl *getCursorInterfaceParent(CXCursor Cursor); |
| 36 | |
| 37 | bool operator==(CXCursor X, CXCursor Y); |
| 38 | |
| 39 | inline bool operator!=(CXCursor X, CXCursor Y) { |
| 40 | return !(X == Y); |
| 41 | } |
| 42 | |
Ted Kremenek | 87553c4 | 2010-01-15 20:35:54 +0000 | [diff] [blame] | 43 | }} // end namespace: clang::cxcursor |
| 44 | |
| 45 | #endif |