forked from OSchip/llvm-project
Don't expand tabs when computing the offset from the code-completion column
llvm-svn: 90881
This commit is contained in:
parent
e74042a8e3
commit
9291ab6d80
|
@ -221,16 +221,10 @@ bool Preprocessor::SetCodeCompletionPoint(const FileEntry *File,
|
|||
}
|
||||
}
|
||||
|
||||
for (unsigned Column = 1; Column < TruncateAtColumn; ++Column, ++Position) {
|
||||
if (!*Position)
|
||||
break;
|
||||
|
||||
if (*Position == '\t')
|
||||
Column += 7;
|
||||
}
|
||||
Position += TruncateAtColumn - 1;
|
||||
|
||||
// Truncate the buffer.
|
||||
if (Position != Buffer->getBufferEnd()) {
|
||||
if (Position < Buffer->getBufferEnd()) {
|
||||
MemoryBuffer *TruncatedBuffer
|
||||
= MemoryBuffer::getMemBufferCopy(Buffer->getBufferStart(), Position,
|
||||
Buffer->getBufferIdentifier());
|
||||
|
|
Loading…
Reference in New Issue