Without this patch, -dump-input prints a diagnostic at the end of
its marker range. For example:
1: Start. check:1 ^~~~~~ 2: Bad. next:2 X~~~ 3: Many lines next:2 ~~~~~~~~~~ 4: of input. next:2 ~~~~~~~~~ 5: End. next:2 ~~~~ error: no match found
This patch moves it to the beginning like this:
1: Start. check:1 ^~~~~~ 2: Bad. next:2 X~~~ error: no match found 3: Many lines next:2 ~~~~~~~~~~ 4: of input. next:2 ~~~~~~~~~ 5: End. next:2 ~~~~
The former somehow looks nicer because the diagnostic doesn't appear
to be somewhere within the marker range. However, the latter is more
practical, especially when the marker range includes the remainder of
a very long dump. First, in the case of an error, this patch enables
me to search the dump for error: and usually immediately land where
the detected error began. Second, when trying to follow FileCheck's
logic, it's best to read top down, so this patch enables me to see
each diagnostic as soon as I encounter its marker.