blob: be1ac8b6eaf9112b7f5437bc76a9c8d9d34354f8 [file] [log] [blame]
Ted Kremenek87553c42010-01-15 20:35:54 +00001//===- 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
19namespace clang {
20
21class Decl;
Douglas Gregorc58d05b2010-01-15 21:56:13 +000022class Expr;
23class NamedDecl;
Ted Kremenek87553c42010-01-15 20:35:54 +000024class Stmt;
25
26namespace cxcursor {
27
28CXCursor MakeCXCursor(CXCursorKind K, clang::Decl *D);
29CXCursor MakeCXCursor(CXCursorKind K, clang::Decl *D, clang::Stmt *S);
30
Douglas Gregorc58d05b2010-01-15 21:56:13 +000031Decl *getCursorDecl(CXCursor Cursor);
32Expr *getCursorExpr(CXCursor Cursor);
33Stmt *getCursorStmt(CXCursor Cursor);
34Decl *getCursorReferringDecl(CXCursor Cursor);
35NamedDecl *getCursorInterfaceParent(CXCursor Cursor);
36
37bool operator==(CXCursor X, CXCursor Y);
38
39inline bool operator!=(CXCursor X, CXCursor Y) {
40 return !(X == Y);
41}
42
Ted Kremenek87553c42010-01-15 20:35:54 +000043}} // end namespace: clang::cxcursor
44
45#endif