When a parameter list in a C function has an error, recover by forming a K&R function,
instead of a non-function type.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175868 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/Sema/invalid-decl.c b/test/Sema/invalid-decl.c
index b2c2aaf..4e62881 100644
--- a/test/Sema/invalid-decl.c
+++ b/test/Sema/invalid-decl.c
@@ -38,3 +38,7 @@
void foo() {
(void)bar;
}
+
+void test2();
+void test2(undef); // expected-error {{a parameter list without types is only allowed in a function definition}}
+void test2() { }