diff options
author | Dmitri Gribenko <gribozavr@gmail.com> | 2013-01-14 00:46:27 +0000 |
---|---|---|
committer | Dmitri Gribenko <gribozavr@gmail.com> | 2013-01-14 00:46:27 +0000 |
commit | 05756dc8d11cd2054e0cb94f0302e4eb39acc68e (patch) | |
tree | 68278b16cbdac4135904657261cbc00b3b4fd6bc /tools/libclang/IndexingContext.cpp | |
parent | b3958476b21702a15f64f09d2862506d03dffe7b (diff) |
libclang: remove a few const_casts
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172373 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/libclang/IndexingContext.cpp')
-rw-r--r-- | tools/libclang/IndexingContext.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/tools/libclang/IndexingContext.cpp b/tools/libclang/IndexingContext.cpp index 3a73aee59f..43eeb44ef0 100644 --- a/tools/libclang/IndexingContext.cpp +++ b/tools/libclang/IndexingContext.cpp @@ -69,7 +69,7 @@ AttrListInfo::AttrListInfo(const Decl *D, IndexingContext &IdxCtx) for (AttrVec::const_iterator AttrI = D->attr_begin(), AttrE = D->attr_end(); AttrI != AttrE; ++AttrI) { const Attr *A = *AttrI; - CXCursor C = MakeCXCursor(A, const_cast<Decl *>(D), IdxCtx.CXTU); + CXCursor C = MakeCXCursor(A, D, IdxCtx.CXTU); CXIdxLoc Loc = IdxCtx.getIndexLoc(A->getLocation()); switch (C.kind) { default: @@ -644,8 +644,7 @@ bool IndexingContext::handleReference(const NamedDecl *D, SourceLocation Loc, if (!D) return false; - CXCursor Cursor = E ? MakeCXCursor(const_cast<Expr*>(E), - const_cast<Decl*>(cast<Decl>(DC)), CXTU) + CXCursor Cursor = E ? MakeCXCursor(E, cast<Decl>(DC), CXTU) : getRefCursor(D, Loc); return handleReference(D, Loc, Cursor, Parent, DC, E, Kind); } |