diff options
| author | Benjamin Kramer <benny.kra@googlemail.com> | 2011-09-04 20:26:28 +0000 |
|---|---|---|
| committer | Benjamin Kramer <benny.kra@googlemail.com> | 2011-09-04 20:26:28 +0000 |
| commit | 60053cf547af2ff5724406c5eb14a365d2552ef2 (patch) | |
| tree | 78ad6aa98342f1f679b5ede5eca061c3b14b0843 /clang/lib/Lex | |
| parent | 5065864151d7c00292a42c978a39bdf81fe2c02c (diff) | |
| download | bcm5719-llvm-60053cf547af2ff5724406c5eb14a365d2552ef2.tar.gz bcm5719-llvm-60053cf547af2ff5724406c5eb14a365d2552ef2.zip | |
Use const_cast to avoid warnings.
llvm-svn: 139104
Diffstat (limited to 'clang/lib/Lex')
| -rw-r--r-- | clang/lib/Lex/Preprocessor.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Lex/Preprocessor.cpp b/clang/lib/Lex/Preprocessor.cpp index 3175d0450ec..d33d9c513da 100644 --- a/clang/lib/Lex/Preprocessor.cpp +++ b/clang/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); |

