Anders Carlsson | b1d947b | 2009-03-07 23:57:03 +0000 | [diff] [blame] | 1 | // RUN: clang -emit-llvm %s -o %t && |
Douglas Gregor | 5f2bfd4 | 2009-02-13 00:10:09 +0000 | [diff] [blame] | 2 | |
| 3 | // FIXME: This test is intentionally trivial, because we can't yet |
| 4 | // CodeGen anything real in C++. |
| 5 | struct X { }; |
| 6 | struct Y { }; |
Anders Carlsson | b1d947b | 2009-03-07 23:57:03 +0000 | [diff] [blame] | 7 | |
| 8 | // RUN: grep _ZplRK1YRA100_P1X %t | count 1 && |
Douglas Gregor | 5f2bfd4 | 2009-02-13 00:10:09 +0000 | [diff] [blame] | 9 | bool operator+(const Y&, X* (&xs)[100]) { return false; } |
| 10 | |
Anders Carlsson | b1d947b | 2009-03-07 23:57:03 +0000 | [diff] [blame] | 11 | // RUN: grep _Z1f1s %t | count 1 && |
| 12 | typedef struct { int a; } s; |
| 13 | void f(s) { } |
| 14 | |
| 15 | // RUN: grep _Z1f1e %t| count 1 && |
| 16 | typedef enum { foo } e; |
| 17 | void f(e) { } |
| 18 | |
Anders Carlsson | 4843e58 | 2009-03-10 17:07:44 +0000 | [diff] [blame] | 19 | // RUN: grep _Z1f1u %t | count 1 && |
Anders Carlsson | b1d947b | 2009-03-07 23:57:03 +0000 | [diff] [blame] | 20 | typedef union { int a; } u; |
| 21 | void f(u) { } |
Anders Carlsson | 4843e58 | 2009-03-10 17:07:44 +0000 | [diff] [blame] | 22 | |
| 23 | // RUN: grep _Z1f1x %t | count 1 |
| 24 | typedef struct { int a; } x,y; |
| 25 | void f(y) { } |
| 26 | |