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 | 9c256e379e7ee5e3ac40e6e2cb51e557954a1483 (patch) | |
tree | bdff8fcc9fd8b5cf7390826279e6f93dfbf82a4b /clang/tools/libclang/IndexingContext.cpp | |
parent | 049a4ffcb89d80a6424df60cd780dc4877c2a2b2 (diff) | |
download | bcm5719-llvm-9c256e379e7ee5e3ac40e6e2cb51e557954a1483.tar.gz bcm5719-llvm-9c256e379e7ee5e3ac40e6e2cb51e557954a1483.zip |
libclang: remove a few const_casts
llvm-svn: 172373
Diffstat (limited to 'clang/tools/libclang/IndexingContext.cpp')
-rw-r--r-- | clang/tools/libclang/IndexingContext.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/clang/tools/libclang/IndexingContext.cpp b/clang/tools/libclang/IndexingContext.cpp index 3a73aee59f0..43eeb44ef02 100644 --- a/clang/tools/libclang/IndexingContext.cpp +++ b/clang/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); } |