2009-03-24 10:24:46 +08:00
|
|
|
// RUN: clang-cc -emit-llvm %s -o %t &&
|
2009-02-13 08:10:09 +08:00
|
|
|
|
|
|
|
// FIXME: This test is intentionally trivial, because we can't yet
|
|
|
|
// CodeGen anything real in C++.
|
|
|
|
struct X { };
|
|
|
|
struct Y { };
|
2009-03-08 07:57:03 +08:00
|
|
|
|
|
|
|
// RUN: grep _ZplRK1YRA100_P1X %t | count 1 &&
|
2009-02-13 08:10:09 +08:00
|
|
|
bool operator+(const Y&, X* (&xs)[100]) { return false; }
|
|
|
|
|
2009-03-08 07:57:03 +08:00
|
|
|
// RUN: grep _Z1f1s %t | count 1 &&
|
|
|
|
typedef struct { int a; } s;
|
|
|
|
void f(s) { }
|
|
|
|
|
|
|
|
// RUN: grep _Z1f1e %t| count 1 &&
|
|
|
|
typedef enum { foo } e;
|
|
|
|
void f(e) { }
|
|
|
|
|
2009-03-11 01:07:44 +08:00
|
|
|
// RUN: grep _Z1f1u %t | count 1 &&
|
2009-03-08 07:57:03 +08:00
|
|
|
typedef union { int a; } u;
|
|
|
|
void f(u) { }
|
2009-03-11 01:07:44 +08:00
|
|
|
|
|
|
|
// RUN: grep _Z1f1x %t | count 1
|
|
|
|
typedef struct { int a; } x,y;
|
|
|
|
void f(y) { }
|
|
|
|
|