]> granicus.if.org Git - clang/commitdiff
[PCH] Make the const_cast explicit to silence a compiler warning.
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>
Fri, 11 Jan 2013 22:29:49 +0000 (22:29 +0000)
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>
Fri, 11 Jan 2013 22:29:49 +0000 (22:29 +0000)
Patch by David Greene.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172262 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Serialization/ASTReader.cpp

index f32d53fd8a7ba9ff91cbfe7940c8c9a294b428e8..a4436d16716a153e612c1ba9ce17d5152814542f 100644 (file)
@@ -655,7 +655,8 @@ ASTDeclContextNameLookupTrait::ReadData(internal_key_type,
                                         unsigned DataLen) {
   using namespace clang::io;
   unsigned NumDecls = ReadUnalignedLE16(d);
-  LE32DeclID *Start = (LE32DeclID *)d;
+  LE32DeclID *Start = reinterpret_cast<LE32DeclID *>(
+                        const_cast<unsigned char *>(d));
   return std::make_pair(Start, Start + NumDecls);
 }