diff --git a/tools/libclang/CIndexInclusionStack.cpp b/tools/libclang/CIndexInclusionStack.cpp index f613f0f1c5bd2d3f9b8fd671d33e1c31d29460bb..4ee1467274aa7b792385533053778ac32062c5ce 100644 --- a/tools/libclang/CIndexInclusionStack.cpp +++ b/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<CXFile>( + const_cast<FileEntry *>(FI.getContentCache()->OrigEntry)), InclusionStack.data(), InclusionStack.size(), clientData); } }