]> granicus.if.org Git - clang/commitdiff
Fix Casting
authorDavid Greene <greened@obbligato.org>
Tue, 15 Jan 2013 22:09:46 +0000 (22:09 +0000)
committerDavid Greene <greened@obbligato.org>
Tue, 15 Jan 2013 22:09:46 +0000 (22:09 +0000)
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

index f613f0f1c5bd2d3f9b8fd671d33e1c31d29460bb..4ee1467274aa7b792385533053778ac32062c5ce 100644 (file)
@@ -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);
   }    
 }