]> granicus.if.org Git - clang/commitdiff
Fix Casting
authorDavid Greene <greened@obbligato.org>
Tue, 15 Jan 2013 22:09:48 +0000 (22:09 +0000)
committerDavid Greene <greened@obbligato.org>
Tue, 15 Jan 2013 22:09:48 +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@172563 91177308-0d34-0410-b5e6-96231b3b80d8

tools/libclang/CXLoadedDiagnostic.cpp

index e5b6ccc5b7e81ea32b6d04c2193f2190adfd0eeb..cdf9d1756f067ca2e5aa24e1bc024a41f426fcbc 100644 (file)
@@ -512,7 +512,7 @@ LoadResult DiagLoader::readLocation(CXLoadedDiagnosticSetImpl &TopDiags,
     reportInvalidFile("Corrupted file entry in source location");
     return Failure;
   }
-  Loc.file = (void*) FE;
+  Loc.file = const_cast<FileEntry *>(FE);
   Loc.line = Record[offset++];
   Loc.column = Record[offset++];
   Loc.offset = Record[offset++];