Set sext/zext on function result.
 - <rdar://problem/6156739>


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55815 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/CodeGen/function-attributes.c b/test/CodeGen/function-attributes.c
new file mode 100644
index 0000000..bb482a0
--- /dev/null
+++ b/test/CodeGen/function-attributes.c
@@ -0,0 +1,22 @@
+// RUN: clang -emit-llvm -o %t.clang.ll %s &&
+// RUN: %llvmgcc -c --emit-llvm -o - %s | llvm-dis -f -o %t.gcc.ll &&
+// RUN: grep "define" %t.clang.ll | sort > %t.clang.defs &&
+// RUN: grep "define" %t.gcc.ll | sort > %t.gcc.defs &&
+// RUN: diff %t.clang.defs %t.gcc.defs
+
+signed char f0(int x) { return x; }
+
+unsigned char f1(int x) { return x; }
+
+void f2(signed char x) { }
+
+void f3(unsigned char x) { }
+
+signed short f4(int x) { return x; }
+
+unsigned short f5(int x) { return x; }
+
+void f6(signed short x) { }
+
+void f7(unsigned short x) { }
+