]> granicus.if.org Git - clang/commit
map source ranges through macro expansions. Before:
authorChris Lattner <sabre@nondot.org>
Fri, 20 Feb 2009 00:25:28 +0000 (00:25 +0000)
committerChris Lattner <sabre@nondot.org>
Fri, 20 Feb 2009 00:25:28 +0000 (00:25 +0000)
commit676f0242a86d7652de586cff360c07c4e752035b
tree87db6582d32fb68536a57b8f70513c43f7925fc0
parent4451bd943c7dcdc4ac1542d176e548cf73021d97
map source ranges through macro expansions.  Before:

t.m:5:2: error: invalid operands to binary expression ('typeof(P)' (aka 'struct mystruct') and 'typeof(F)' (aka 'float'))
 MAX(P, F);
 ^~~~~~~~~
t.m:1:78: note: instantiated from:
#define MAX(A,B)    ({ __typeof__(A) __a = (A); __typeof__(B) __b = (B); __a < __b ? __b : __a; })
                                                                             ^

(no ranges on the second diagnostics)

After:

t.m:5:2: error: invalid operands to binary expression ('typeof(P)' (aka 'struct mystruct') and 'typeof(F)' (aka 'float'))
 MAX(P, F);
 ^~~~~~~~~
t.m:1:78: note: instantiated from:
#define MAX(A,B)    ({ __typeof__(A) __a = (A); __typeof__(B) __b = (B); __a < __b ? __b : __a; })
                                                                         ~~~ ^ ~~~

(ranges!)

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