aboutsummaryrefslogtreecommitdiff
path: root/lib/Frontend/PCHWriter.cpp
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2009-04-15 00:08:05 +0000
committerDaniel Dunbar <daniel@zuster.org>2009-04-15 00:08:05 +0000
commit44e35f7b2b5da1eb338639e46bf0b5522e75c5f3 (patch)
tree4daf9f8ac36e583afb36ef8cad3803f5f0ce28b1 /lib/Frontend/PCHWriter.cpp
parentc04db4feefa2b0dbbc6876cb4eeeee108aa6791d (diff)
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; ~ ^ git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69114 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Frontend/PCHWriter.cpp')
0 files changed, 0 insertions, 0 deletions