diff options
| author | Roman Divacky <rdivacky@FreeBSD.org> | 2010-03-03 17:28:16 +0000 |
|---|---|---|
| committer | Roman Divacky <rdivacky@FreeBSD.org> | 2010-03-03 17:28:16 +0000 |
| commit | 79ade4e028932fcb9dab15e2fb2305ca15ab0f14 (patch) | |
| tree | e1a885aadfd80632f5bd70d4bd2d37e715e35a79 /test/CodeGen/functions.c | |
| parent | ecb7e5c8afe929ee38155db94de6b084ec32a645 (diff) | |
Notes
Diffstat (limited to 'test/CodeGen/functions.c')
| -rw-r--r-- | test/CodeGen/functions.c | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/test/CodeGen/functions.c b/test/CodeGen/functions.c index cb9a4ef81f13..5629ef582a60 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{{.*}}) +} |
