Do typechecking and codegen for K&R-style function declarations 
correctly.  Not a regression, but made more obvious by my recent fix 
which made function type compatibility checking a bit more strict.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55339 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/CodeGen/kr-func-promote.c b/test/CodeGen/kr-func-promote.c
new file mode 100644
index 0000000..a20532a
--- /dev/null
+++ b/test/CodeGen/kr-func-promote.c
@@ -0,0 +1,5 @@
+// RUN: clang %s -emit-llvm -o - | grep "i32 @a(i32)"
+
+int a();
+int a(x) short x; {return x;}
+