summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaCodeComplete.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-05-14 17:44:56 +0000
committerChris Lattner <sabre@nondot.org>2010-05-14 17:44:56 +0000
commitff895c140c507b8629dd253910c752feef00cf41 (patch)
treee57cb0f65a9b6acd8c21590bbc28851a389b16ff /clang/lib/Sema/SemaCodeComplete.cpp
parentd3e4ba18ac3c05987f54ed16d7ef1798ff1f3581 (diff)
downloadbcm5719-llvm-ff895c140c507b8629dd253910c752feef00cf41.tar.gz
bcm5719-llvm-ff895c140c507b8629dd253910c752feef00cf41.zip
Improve error recovery in C/ObjC when the first argument of a function
declarator is incorrect. Not being a typename causes the parser to dive down into the K&R identifier list handling stuff, which is almost never the right thing to do. Before: r.c:3:17: error: expected ')' void bar(intptr y); ^ r.c:3:9: note: to match this '(' void bar(intptr y); ^ r.c:3:10: error: a parameter list without types is only allowed in a function definition void bar(intptr y); ^ After: r.c:3:10: error: unknown type name 'intptr'; did you mean 'intptr_t'? void bar(intptr y); ^~~~~~ intptr_t r.c:1:13: note: 'intptr_t' declared here typedef int intptr_t; ^ This fixes rdar://7980651 - poor recovery for bad type in the first arg of a C function llvm-svn: 103783
Diffstat (limited to 'clang/lib/Sema/SemaCodeComplete.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud