From 61eacf0f4f912ef4834ff4ed5d7072b655fe91bf Mon Sep 17 00:00:00 2001
From: David Greene <greened@obbligato.org>
Date: Tue, 15 Jan 2013 22:09:46 +0000
Subject: [PATCH] Fix Casting

Use const_cast<> to avoid a cast-away-const error.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172562 91177308-0d34-0410-b5e6-96231b3b80d8
---
 tools/libclang/CIndexInclusionStack.cpp | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/tools/libclang/CIndexInclusionStack.cpp b/tools/libclang/CIndexInclusionStack.cpp
index f613f0f1c5b..4ee1467274a 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);
   }    
 }
-- 
GitLab