[cfe-commits] r172562 - /cfe/trunk/tools/libclang/CIndexInclusionStack.cpp

David Greene greened at obbligato.org
Tue Jan 15 14:09:46 PST 2013


Author: greened
Date: Tue Jan 15 16:09:46 2013
New Revision: 172562

URL: http://llvm.org/viewvc/llvm-project?rev=172562&view=rev
Log:
Fix Casting

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

Modified:
    cfe/trunk/tools/libclang/CIndexInclusionStack.cpp

Modified: cfe/trunk/tools/libclang/CIndexInclusionStack.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/libclang/CIndexInclusionStack.cpp?rev=172562&r1=172561&r2=172562&view=diff
==============================================================================
--- cfe/trunk/tools/libclang/CIndexInclusionStack.cpp (original)
+++ cfe/trunk/tools/libclang/CIndexInclusionStack.cpp Tue Jan 15 16:09:46 2013
@@ -64,7 +64,8 @@
             
     // 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);
   }    
 }





More information about the cfe-commits mailing list