forked from OSchip/llvm-project
parent
5065864151
commit
60053cf547
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue