forked from OSchip/llvm-project
fix bug in SourceColumnMap::startOfPreviousColumn
llvm-svn: 167360
This commit is contained in:
parent
f9db130715
commit
d38c708dc1
|
@ -298,7 +298,7 @@ struct SourceColumnMap {
|
|||
/// \brief Map from a byte index to the previous byte which starts a column.
|
||||
int startOfPreviousColumn(int N) const {
|
||||
assert(0 < N && N < static_cast<int>(m_columnToByte.size()));
|
||||
while (byteToColumn(N--) == -1) {}
|
||||
while (byteToColumn(--N) == -1) {}
|
||||
return N;
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
// RUN: %clang_cc1 -fsyntax-only -fmessage-length 100 %s 2>&1 | FileCheck -strict-whitespace %s
|
||||
// REQUIRES: asserts
|
||||
|
||||
int main() {
|
||||
"É#x#p)6Ò)ѽŠ$ûž>U êhÑüÃö|Ÿ থϻgŸY|`?ò;;Æ¿VjÇ\\ù€‡ûݪW9úТ:ÌŠO EøÛ<C3B8>y?SKªy¦¹‡Øài&n";
|
||||
}
|
||||
|
||||
// CHECK-NOT:Assertion
|
Loading…
Reference in New Issue