diff options
author | dim <dim@FreeBSD.org> | 2012-04-14 14:01:31 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2012-04-14 14:01:31 +0000 |
commit | 50b73317314e889cf39c7b1d6cbf419fa7502f22 (patch) | |
tree | be1815eb79b42ff482a8562b13c2dcbf0c5dcbee /test/CodeGen/decl-in-prototype.c | |
parent | dc04cb328508e61aad809d9b53b12f9799a00e7d (diff) | |
download | FreeBSD-src-50b73317314e889cf39c7b1d6cbf419fa7502f22.zip FreeBSD-src-50b73317314e889cf39c7b1d6cbf419fa7502f22.tar.gz |
Vendor import of clang trunk r154661:
http://llvm.org/svn/llvm-project/cfe/trunk@r154661
Diffstat (limited to 'test/CodeGen/decl-in-prototype.c')
-rw-r--r-- | test/CodeGen/decl-in-prototype.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/test/CodeGen/decl-in-prototype.c b/test/CodeGen/decl-in-prototype.c new file mode 100644 index 0000000..949793d --- /dev/null +++ b/test/CodeGen/decl-in-prototype.c @@ -0,0 +1,21 @@ +// RUN: %clang -emit-llvm -S -o - %s | FileCheck %s + +const int AA = 5; + +// CHECK: define i32 @f1 +int f1(enum {AA,BB} E) { + // CHECK: ret i32 1 + return BB; +} + +// CHECK: define i32 @f2 +int f2(enum {AA=7,BB} E) { + // CHECK: ret i32 7 + return AA; +} + +// Check nested function declarators work. +int f(void (*g)(), enum {AA,BB} h) { + // CHECK: ret i32 0 + return AA; +} |