diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2011-11-18 00:26:51 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2011-11-18 00:26:51 +0000 |
commit | b395c63b473bf1b3783bff371a993332e8c4c5e3 (patch) | |
tree | f4f47baaeab8513c8b478c3461f2c4d45aa11d12 /tools/libclang/CXCursor.cpp | |
parent | 144b6c0c50b5523609cbac523f168b9e3cb01175 (diff) |
[libclang] Indexing API:
-For indexDeclaration, also pass the declaration attributes as an array of cursors.
-Rename CXIndexOpt_OneRefPerFile -> CXIndexOpt_SuppressRedundantRefs, and only pass
a reference if a declaration/definition does not exist in the file.
-Other fixes.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144942 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/libclang/CXCursor.cpp')
-rw-r--r-- | tools/libclang/CXCursor.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/tools/libclang/CXCursor.cpp b/tools/libclang/CXCursor.cpp index 202a19254e..bba0928cea 100644 --- a/tools/libclang/CXCursor.cpp +++ b/tools/libclang/CXCursor.cpp @@ -535,12 +535,12 @@ cxcursor::getCursorTypeRef(CXCursor C) { reinterpret_cast<uintptr_t>(C.data[1]))); } -CXCursor cxcursor::MakeCursorTemplateRef(TemplateDecl *Template, +CXCursor cxcursor::MakeCursorTemplateRef(const TemplateDecl *Template, SourceLocation Loc, CXTranslationUnit TU) { assert(Template && TU && "Invalid arguments!"); void *RawLoc = reinterpret_cast<void *>(Loc.getRawEncoding()); - CXCursor C = { CXCursor_TemplateRef, 0, { Template, RawLoc, TU } }; + CXCursor C = { CXCursor_TemplateRef, 0, { (void*)Template, RawLoc, TU } }; return C; } @@ -552,13 +552,14 @@ cxcursor::getCursorTemplateRef(CXCursor C) { reinterpret_cast<uintptr_t>(C.data[1]))); } -CXCursor cxcursor::MakeCursorNamespaceRef(NamedDecl *NS, SourceLocation Loc, +CXCursor cxcursor::MakeCursorNamespaceRef(const NamedDecl *NS, + SourceLocation Loc, CXTranslationUnit TU) { assert(NS && (isa<NamespaceDecl>(NS) || isa<NamespaceAliasDecl>(NS)) && TU && "Invalid arguments!"); void *RawLoc = reinterpret_cast<void *>(Loc.getRawEncoding()); - CXCursor C = { CXCursor_NamespaceRef, 0, { NS, RawLoc, TU } }; + CXCursor C = { CXCursor_NamespaceRef, 0, { (void*)NS, RawLoc, TU } }; return C; } @@ -570,12 +571,12 @@ cxcursor::getCursorNamespaceRef(CXCursor C) { reinterpret_cast<uintptr_t>(C.data[1]))); } -CXCursor cxcursor::MakeCursorMemberRef(FieldDecl *Field, SourceLocation Loc, +CXCursor cxcursor::MakeCursorMemberRef(const FieldDecl *Field, SourceLocation Loc, CXTranslationUnit TU) { assert(Field && TU && "Invalid arguments!"); void *RawLoc = reinterpret_cast<void *>(Loc.getRawEncoding()); - CXCursor C = { CXCursor_MemberRef, 0, { Field, RawLoc, TU } }; + CXCursor C = { CXCursor_MemberRef, 0, { (void*)Field, RawLoc, TU } }; return C; } |