summaryrefslogtreecommitdiffstats
path: root/test/CodeGen/functions.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/CodeGen/functions.c')
-rw-r--r--test/CodeGen/functions.c21
1 files changed, 15 insertions, 6 deletions
diff --git a/test/CodeGen/functions.c b/test/CodeGen/functions.c
index cb9a4ef..5629ef5 100644
--- a/test/CodeGen/functions.c
+++ b/test/CodeGen/functions.c
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 %s -emit-llvm -o %t
+// RUN: %clang_cc1 %s -emit-llvm -o - -verify | FileCheck %s
int g();
@@ -19,22 +19,31 @@ void test3(T f) {
int a(int);
int a() {return 1;}
-// RUN: grep 'define void @f0()' %t
void f0() {}
+// CHECK: define void @f0()
void f1();
-// RUN: grep 'call void @f1()' %t
void f2(void) {
+// CHECK: call void @f1()
f1(1, 2, 3);
}
-// RUN: grep 'define void @f1()' %t
+// CHECK: define void @f1()
void f1() {}
-// RUN: grep 'define .* @f3' %t | not grep -F '...'
+// CHECK: define {{.*}} @f3{{\(\)|\(.*sret.*\)}}
struct foo { int X, Y, Z; } f3() {
while (1) {}
}
// PR4423 - This shouldn't crash in codegen
void f4() {}
-void f5() { f4(42); }
+void f5() { f4(42); } //expected-warning {{too many arguments}}
+
+// Qualifiers on parameter types shouldn't make a difference.
+static void f6(const float f, const float g) {
+}
+void f7(float f, float g) {
+ f6(f, g);
+// CHECK: define void @f7(float{{.*}}, float{{.*}})
+// CHECK: call void @f6(float{{.*}}, float{{.*}})
+}
OpenPOWER on IntegriCloud