summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-02-17 08:44:50 +0000
committerChris Lattner <sabre@nondot.org>2009-02-17 08:44:50 +0000
commit7b60a164b19662061bc7125f46ae7c516fd09b52 (patch)
treed9baebd57b21db276528c83285555747c906624f /llvm/lib
parenta6f037cee1a80d7616f83f7ce0e629eeed19d357 (diff)
downloadbcm5719-llvm-7b60a164b19662061bc7125f46ae7c516fd09b52.tar.gz
bcm5719-llvm-7b60a164b19662061bc7125f46ae7c516fd09b52.zip
As an experimental hack, emit "instantiated from" information in
diagnostics. I'm not sure I want to keep this, but hey, it's easy and could be useful or something, even if guarded by a -fshow-me-tons-of-details option. A silly example is: #define A B #define C A #define D C int y = D; We now emit: t.c:11:9: error: use of undeclared identifier 'B' int y = D; ^ t.c:9:11: note: instantiated from: #define D C ^ t.c:8:11: note: instantiated from: #define C A ^ t.c:7:11: note: instantiated from: #define A B ^ A more useful example is from tgmath: t.c:4:9: error: no matching function for call to '__tg_acos' return acos(x); ^~~~~~~ /Users/sabre/llvm/Debug/Headers/tgmath-sofar.h:51:17: note: instantiated from: #define acos(x) __tg_acos(x) ^ ... candidate set follows ... This does not yet print ranges in instantiation info, (e.g. highlighting the range "__tg_acos(x)" in the last example), but that could be added if we decide this is a good idea :). Thoughts and bug reports welcome! llvm-svn: 64761
Diffstat (limited to 'llvm/lib')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud