diff options
author | Seth Cantrell <seth.cantrell@gmail.com> | 2012-11-03 21:21:17 +0000 |
---|---|---|
committer | Seth Cantrell <seth.cantrell@gmail.com> | 2012-11-03 21:21:17 +0000 |
commit | 6292e5b8e501ee0cbcfcd8998cb098e10a4c4278 (patch) | |
tree | 286901677a7885da47b9dbd48ab720b1e7023100 /clang/lib/Frontend/TextDiagnostic.cpp | |
parent | d38c708dc19953026f5b3b238bf32099ff93b376 (diff) | |
download | bcm5719-llvm-6292e5b8e501ee0cbcfcd8998cb098e10a4c4278.tar.gz bcm5719-llvm-6292e5b8e501ee0cbcfcd8998cb098e10a4c4278.zip |
don't step into the middle of multibyte sequences
llvm-svn: 167361
Diffstat (limited to 'clang/lib/Frontend/TextDiagnostic.cpp')
-rw-r--r-- | clang/lib/Frontend/TextDiagnostic.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/Frontend/TextDiagnostic.cpp b/clang/lib/Frontend/TextDiagnostic.cpp index 0eb3d60e0b0..ca55197f90e 100644 --- a/clang/lib/Frontend/TextDiagnostic.cpp +++ b/clang/lib/Frontend/TextDiagnostic.cpp @@ -418,7 +418,7 @@ static void selectInterestingSourceRegion(std::string &SourceLine, bool ExpandedRegion = false; if (SourceStart>0) { - unsigned NewStart = SourceStart-1; + unsigned NewStart = map.startOfPreviousColumn(SourceStart); // Skip over any whitespace we see here; we're looking for // another bit of interesting text. @@ -445,7 +445,7 @@ static void selectInterestingSourceRegion(std::string &SourceLine, } if (SourceEnd<SourceLine.size()) { - unsigned NewEnd = SourceEnd+1; + unsigned NewEnd = map.startOfNextColumn(SourceEnd); // Skip over any whitespace we see here; we're looking for // another bit of interesting text. |