aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-04-12 20:42:31 +0000
committerChris Lattner <sabre@nondot.org>2009-04-12 20:42:31 +0000
commit6cc055af1df10c5255273c8308a381540e3af443 (patch)
tree24ba04bc673ecdb1c83529ad194a632eb0097abe /llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
parent4ac15cee54479089604216c823eaeb6852d56816 (diff)
downloadllvm-6cc055af1df10c5255273c8308a381540e3af443.zip
llvm-6cc055af1df10c5255273c8308a381540e3af443.tar.gz
llvm-6cc055af1df10c5255273c8308a381540e3af443.tar.bz2
Implement the first set of changes for PR3963 and rdar://6759604,
which tries to do better error recovery when it is "obvious" that an identifier is a mis-typed typename. In this case, we try to parse it as a typename instead of as the identifier in a declarator, which gives us several options for better error recovery and immediately makes diagnostics more useful. For example, we now produce: t.c:4:8: error: unknown type name 'foo_t' static foo_t a = 4; ^ instead of: t.c:4:14: error: invalid token after top level declarator static foo_t a = 4; ^ Also, since we now parse "a" correctly, we make a decl for it, preventing later uses of 'a' from emitting things like: t.c:12:20: error: use of undeclared identifier 'a' int bar() { return a + b; } ^ I'd really appreciate any scrutiny possible on this, it is a tricky area. llvm-svn: 68911
Diffstat (limited to 'llvm/lib/Bitcode/Writer/BitcodeWriter.cpp')
0 files changed, 0 insertions, 0 deletions