summaryrefslogtreecommitdiffstats
path: root/clang/tools/CIndex/CXCursor.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/tools/CIndex/CXCursor.cpp')
-rw-r--r--clang/tools/CIndex/CXCursor.cpp17
1 files changed, 6 insertions, 11 deletions
diff --git a/clang/tools/CIndex/CXCursor.cpp b/clang/tools/CIndex/CXCursor.cpp
index 7dd3ae9cc00..7c8b33d1ae4 100644
--- a/clang/tools/CIndex/CXCursor.cpp
+++ b/clang/tools/CIndex/CXCursor.cpp
@@ -22,16 +22,10 @@
using namespace clang;
-CXCursor cxcursor::MakeCXCursor(CXCursorKind K, Decl *D) {
- CXCursor C = { K, { D, 0, 0 } };
- return C;
-}
-
-CXCursor cxcursor::MakeCXCursor(CXCursorKind K, Decl *D, Stmt *S,
- ASTContext &Context) {
- assert(clang_isReference(K));
- CXCursor C = { K, { D, S, &Context } };
- return C;
+CXCursor cxcursor::MakeCXCursorInvalid(CXCursorKind K) {
+ assert(K >= CXCursor_FirstInvalid && K <= CXCursor_LastInvalid);
+ CXCursor C = { K, { 0, 0, 0 } };
+ return C;
}
static CXCursorKind GetCursorKind(Decl *D) {
@@ -78,7 +72,8 @@ static CXCursorKind GetCursorKind(Decl *D) {
}
CXCursor cxcursor::MakeCXCursor(Decl *D) {
- return MakeCXCursor(GetCursorKind(D), D);
+ CXCursor C = { GetCursorKind(D), { D, 0, 0 } };
+ return C;
}
CXCursor cxcursor::MakeCXCursor(Stmt *S, Decl *Parent) {
OpenPOWER on IntegriCloud