Use const_cast to make it obvious that it's just removing constness (and silence warnings).

llvm-svn: 143193
diff --git a/clang/tools/libclang/IndexingContext.cpp b/clang/tools/libclang/IndexingContext.cpp
index f295582..0f00bac 100644
--- a/clang/tools/libclang/IndexingContext.cpp
+++ b/clang/tools/libclang/IndexingContext.cpp
@@ -397,9 +397,11 @@
   if (isNotFromSourceFile(D->getLocation()))
     return;
 
-  CXIdxEntityRefInfo Info = { E ? MakeCXCursor((Stmt*)E,
-                                               (Decl*)cast<Decl>(DC), CXTU)
-                                : getRefCursor(D, Loc),
+  CXCursor Cursor = E ? MakeCXCursor(const_cast<Expr*>(E),
+                                     const_cast<Decl*>(cast<Decl>(DC)), CXTU)
+                      : getRefCursor(D, Loc);
+
+  CXIdxEntityRefInfo Info = { Cursor,
                               getIndexLoc(Loc),
                               getIndexEntity(D),
                               getIndexEntity(Parent),