Use const_cast to avoid warnings.

llvm-svn: 139104
This commit is contained in:
Benjamin Kramer 2011-09-04 20:26:28 +00:00
parent 5065864151
commit 60053cf547
1 changed files with 1 additions and 1 deletions

View File

@ -312,7 +312,7 @@ bool Preprocessor::SetCodeCompletionPoint(const FileEntry *File,
MemoryBuffer *NewBuffer =
MemoryBuffer::getNewUninitMemBuffer(Buffer->getBufferSize() + 1,
Buffer->getBufferIdentifier());
char *NewBuf = (char*)NewBuffer->getBufferStart();
char *NewBuf = const_cast<char*>(NewBuffer->getBufferStart());
char *NewPos = std::copy(Buffer->getBufferStart(), Position, NewBuf);
*NewPos = '\0';
std::copy(Position, Buffer->getBufferEnd(), NewPos+1);