]> granicus.if.org Git - clang/commit
When forming the squigly underline for a diagnostic, make sure to
authorChris Lattner <sabre@nondot.org>
Sat, 12 Jan 2008 06:43:35 +0000 (06:43 +0000)
committerChris Lattner <sabre@nondot.org>
Sat, 12 Jan 2008 06:43:35 +0000 (06:43 +0000)
commite41b7cd768fe5722c1adcf4056d586c59514ec29
tree93e638a3adb2bf33e3ec9418738572435f9eee0a
parent3d2da3d765123e15290c38ba44f4434462bb88d5
When forming the squigly underline for a diagnostic, make sure to
verify that the source range corresponds to the current file, not
just the current line.  This allows us to emit:

a.c:1:44: error: invalid operands to binary expression ('double' and 'int *')
double a; int *b; void f(void) { int c = a +
                                         ~ ^

instead of:

a.c:1:44: error: invalid operands to binary expression ('double' and 'int *')
double a; int *b; void f(void) { int c = a +
~                                        ~ ^

for PR1906 (note the leading ~).

Thanks to Neil for noticing this.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45901 91177308-0d34-0410-b5e6-96231b3b80d8
Driver/TextDiagnosticPrinter.cpp
Driver/TextDiagnosticPrinter.h