diff options
author | Daniel Dunbar <daniel@zuster.org> | 2009-04-15 00:08:05 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2009-04-15 00:08:05 +0000 |
commit | c2223ab255b2a4e5be83c36c66565263cf3c7f9a (patch) | |
tree | b25ae74139e2c6d2ba28713a59bd9ca1c593203a /llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp | |
parent | 1be3b53d3c4066f536ed07a5cb1f0a8cdac0d445 (diff) | |
download | bcm5719-llvm-c2223ab255b2a4e5be83c36c66565263cf3c7f9a.tar.gz bcm5719-llvm-c2223ab255b2a4e5be83c36c66565263cf3c7f9a.zip |
Improve "assignment to cast" diagnostic.
- Strip off extra parens when looking for casts.
- Change the location info to point at the cast (instead of the
assignment).
For example, on
int *b;
#define a ((void*) b)
void f0() {
a = 10;
}
we now emit:
/tmp/t.c:4:3: error: assignment to cast is illegal, lvalue casts are not supported
a = 10;
^ ~
/tmp/t.c:2:12: note: instantiated from:
#define a ((void*) b)
~^~~~~~~~~~
instead of:
/tmp/t.c:4:5: error: expression is not assignable
a = 10;
~ ^
llvm-svn: 69114
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp')
0 files changed, 0 insertions, 0 deletions