aboutsummaryrefslogtreecommitdiff
path: root/lib/Lex/Preprocessor.cpp
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2011-09-04 20:26:28 +0000
committerBenjamin Kramer <benny.kra@googlemail.com>2011-09-04 20:26:28 +0000
commit41a50a9b730cf52bd4c34d3895f00ae32f458eb5 (patch)
tree632ae64071a92271c3197b73c8f212f37800fa7d /lib/Lex/Preprocessor.cpp
parent87e96eb04ba26022e03263da9d75299ea72adb8f (diff)
Use const_cast to avoid warnings.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139104 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Lex/Preprocessor.cpp')
-rw-r--r--lib/Lex/Preprocessor.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Lex/Preprocessor.cpp b/lib/Lex/Preprocessor.cpp
index 3175d0450e..d33d9c513d 100644
--- a/lib/Lex/Preprocessor.cpp
+++ b/lib/Lex/Preprocessor.cpp
@@ -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);