diff options
author | Chris Lattner <sabre@nondot.org> | 2009-04-25 06:12:16 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-04-25 06:12:16 +0000 |
commit | 9af40c1e1401e6e6bf49ac75577ebfebe2ddf4c8 (patch) | |
tree | f8735cf68fe67b547ea616d5a2e611a251f7f423 /clang/lib/Driver/Driver.cpp | |
parent | 47c0d00c3fb6a845dc305fd5279b244be625d1fe (diff) | |
download | bcm5719-llvm-9af40c1e1401e6e6bf49ac75577ebfebe2ddf4c8.tar.gz bcm5719-llvm-9af40c1e1401e6e6bf49ac75577ebfebe2ddf4c8.zip |
fix PR4049, a crash on invalid, by making sema install the right number of
parameters in a functiondecl, even if the decl is invalid and has a confusing
Declarator. On the testcase, we now emit one beautiful diagnostic:
t.c:2:1: error: unknown type name 'unknown_type'
unknown_type f(void*)
^
GCC 4.0 produces:
t.c:2: error: syntax error before ‘f’
t.c: In function ‘f’:
t.c:2: error: parameter name omitted
and GCC 4.2:
t.c:2: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘f’
llvm-svn: 70016
Diffstat (limited to 'clang/lib/Driver/Driver.cpp')
0 files changed, 0 insertions, 0 deletions