diff options
| author | Fariborz Jahanian <fjahanian@apple.com> | 2012-09-05 17:52:12 +0000 |
|---|---|---|
| committer | Fariborz Jahanian <fjahanian@apple.com> | 2012-09-05 17:52:12 +0000 |
| commit | aaf376b4dd9a75bc8c3a7da65b7acfea68c53eb1 (patch) | |
| tree | cc851ddb3838b81949fb5b6a30a505ef337b8d35 /clang/test/Sema/invalid-decl.c | |
| parent | 6d92188ff75e7ea12fc2014c4ce0235c822b9393 (diff) | |
| download | bcm5719-llvm-aaf376b4dd9a75bc8c3a7da65b7acfea68c53eb1.tar.gz bcm5719-llvm-aaf376b4dd9a75bc8c3a7da65b7acfea68c53eb1.zip | |
c error recovery. treat an invalid redeclaration
of a c-function for what it is. Otherwise, this func
is treated as an overloadable c-function resulting in
a crash much later. // rdar://11743706
llvm-svn: 163224
Diffstat (limited to 'clang/test/Sema/invalid-decl.c')
| -rw-r--r-- | clang/test/Sema/invalid-decl.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/clang/test/Sema/invalid-decl.c b/clang/test/Sema/invalid-decl.c index 2699b254926..b2c2aaf1a0f 100644 --- a/clang/test/Sema/invalid-decl.c +++ b/clang/test/Sema/invalid-decl.c @@ -29,3 +29,12 @@ typedef struct { void f(StructType *buf) { buf->fun = 0; } + +// rdar://11743706 +static void bar(hid_t, char); // expected-error {{expected identifier}} + +static void bar(hid_t p, char); // expected-error {{unknown type name 'hid_t'}} + +void foo() { + (void)bar; +} |

