From 0516ba604b5b0009c2c569648ff994c0ea117326 Mon Sep 17 00:00:00 2001 From: David Greene Date: Tue, 15 Jan 2013 22:09:46 +0000 Subject: [PATCH] Fix Casting Use const_cast<> to avoid a cast-away-const error. llvm-svn: 172562 --- clang/tools/libclang/CIndexInclusionStack.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/clang/tools/libclang/CIndexInclusionStack.cpp b/clang/tools/libclang/CIndexInclusionStack.cpp index f613f0f..4ee1467 100644 --- a/clang/tools/libclang/CIndexInclusionStack.cpp +++ b/clang/tools/libclang/CIndexInclusionStack.cpp @@ -64,7 +64,8 @@ void clang_getInclusions(CXTranslationUnit TU, CXInclusionVisitor CB, // Callback to the client. // FIXME: We should have a function to construct CXFiles. - CB((CXFile) FI.getContentCache()->OrigEntry, + CB(static_cast( + const_cast(FI.getContentCache()->OrigEntry)), InclusionStack.data(), InclusionStack.size(), clientData); } } -- 2.7.4