summaryrefslogtreecommitdiffstats
path: root/clang/test/Sema/invalid-decl.c
diff options
context:
space:
mode:
authorFariborz Jahanian <fjahanian@apple.com>2012-09-05 17:52:12 +0000
committerFariborz Jahanian <fjahanian@apple.com>2012-09-05 17:52:12 +0000
commitaaf376b4dd9a75bc8c3a7da65b7acfea68c53eb1 (patch)
treecc851ddb3838b81949fb5b6a30a505ef337b8d35 /clang/test/Sema/invalid-decl.c
parent6d92188ff75e7ea12fc2014c4ce0235c822b9393 (diff)
downloadbcm5719-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.c9
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;
+}
OpenPOWER on IntegriCloud