[cfe-commits] r172262 - /cfe/trunk/lib/Serialization/ASTReader.cpp
Argyrios Kyrtzidis
akyrtzi at gmail.com
Fri Jan 11 14:29:49 PST 2013
Author: akirtzidis
Date: Fri Jan 11 16:29:49 2013
New Revision: 172262
URL: http://llvm.org/viewvc/llvm-project?rev=172262&view=rev
Log:
[PCH] Make the const_cast explicit to silence a compiler warning.
Patch by David Greene.
Modified:
cfe/trunk/lib/Serialization/ASTReader.cpp
Modified: cfe/trunk/lib/Serialization/ASTReader.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Serialization/ASTReader.cpp?rev=172262&r1=172261&r2=172262&view=diff
==============================================================================
--- cfe/trunk/lib/Serialization/ASTReader.cpp (original)
+++ cfe/trunk/lib/Serialization/ASTReader.cpp Fri Jan 11 16:29:49 2013
@@ -655,7 +655,8 @@
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);
}
More information about the cfe-commits
mailing list