diff options
| author | Dmitri Gribenko <gribozavr@gmail.com> | 2013-02-03 13:19:54 +0000 |
|---|---|---|
| committer | Dmitri Gribenko <gribozavr@gmail.com> | 2013-02-03 13:19:54 +0000 |
| commit | dd7dacfff997c706d0fcc2efc625552fbff44154 (patch) | |
| tree | f076635d49ed886317e9d64f97428071de2f3fae | |
| parent | 500d592f676f1fb81f49d9bc1b5a28928fe1adae (diff) | |
| download | bcm5719-llvm-dd7dacfff997c706d0fcc2efc625552fbff44154.tar.gz bcm5719-llvm-dd7dacfff997c706d0fcc2efc625552fbff44154.zip | |
libclang: remove unneeded const_casts
llvm-svn: 174280
| -rw-r--r-- | clang/tools/libclang/CIndex.cpp | 5 | ||||
| -rw-r--r-- | clang/tools/libclang/IndexingContext.h | 2 |
2 files changed, 3 insertions, 4 deletions
diff --git a/clang/tools/libclang/CIndex.cpp b/clang/tools/libclang/CIndex.cpp index 13be3a162cf..74224c49a4a 100644 --- a/clang/tools/libclang/CIndex.cpp +++ b/clang/tools/libclang/CIndex.cpp @@ -1681,7 +1681,7 @@ class DeclVisit : public VisitorJob { public: DeclVisit(const Decl *D, CXCursor parent, bool isFirst) : VisitorJob(parent, VisitorJob::DeclVisitKind, - const_cast<Decl *>(D), isFirst ? (void*) 1 : (void*) 0) {} + D, isFirst ? (void*) 1 : (void*) 0) {} static bool classof(const VisitorJob *VJ) { return VJ->getKind() == DeclVisitKind; } @@ -1742,8 +1742,7 @@ public: class DeclarationNameInfoVisit : public VisitorJob { public: DeclarationNameInfoVisit(const Stmt *S, CXCursor parent) - : VisitorJob(parent, VisitorJob::DeclarationNameInfoVisitKind, - const_cast<Stmt *>(S)) {} + : VisitorJob(parent, VisitorJob::DeclarationNameInfoVisitKind, S) {} static bool classof(const VisitorJob *VJ) { return VJ->getKind() == VisitorJob::DeclarationNameInfoVisitKind; } diff --git a/clang/tools/libclang/IndexingContext.h b/clang/tools/libclang/IndexingContext.h index 6c8999eec73..c9097c5e6ee 100644 --- a/clang/tools/libclang/IndexingContext.h +++ b/clang/tools/libclang/IndexingContext.h @@ -494,7 +494,7 @@ private: void getContainerInfo(const DeclContext *DC, ContainerInfo &ContInfo); CXCursor getCursor(const Decl *D) { - return cxcursor::MakeCXCursor(const_cast<Decl*>(D), CXTU); + return cxcursor::MakeCXCursor(D, CXTU); } CXCursor getRefCursor(const NamedDecl *D, SourceLocation Loc); |

