mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-26 05:25:47 +00:00
improve filecheck's "scanning from here" caret position.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75371 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -232,6 +232,17 @@ int main(int argc, char **argv) {
|
|||||||
// Otherwise, we have an error, emit an error message.
|
// Otherwise, we have an error, emit an error message.
|
||||||
SM.PrintMessage(CheckStr.second, "expected string not found in input",
|
SM.PrintMessage(CheckStr.second, "expected string not found in input",
|
||||||
"error");
|
"error");
|
||||||
|
|
||||||
|
// Print the scanning from here line. If the current position is at the end
|
||||||
|
// of a line, advance to the start of the next line.
|
||||||
|
const char *Scan = CurPtr;
|
||||||
|
while (Scan != BufferEnd &&
|
||||||
|
(*Scan == ' ' || *Scan == '\t'))
|
||||||
|
++Scan;
|
||||||
|
if (*Scan == '\n' || *Scan == '\r')
|
||||||
|
CurPtr = Scan+1;
|
||||||
|
|
||||||
|
|
||||||
SM.PrintMessage(SMLoc::getFromPointer(CurPtr), "scanning from here",
|
SM.PrintMessage(SMLoc::getFromPointer(CurPtr), "scanning from here",
|
||||||
"note");
|
"note");
|
||||||
return 1;
|
return 1;
|
||||||
|
Reference in New Issue
Block a user