2009-03-24 02:24:46 +00:00
|
|
|
// RUN: clang-cc -emit-llvm %s -o %t &&
|
2009-02-13 00:10:09 +00:00
|
|
|
|
|
|
|
// FIXME: This test is intentionally trivial, because we can't yet
|
|
|
|
// CodeGen anything real in C++.
|
|
|
|
struct X { };
|
|
|
|
struct Y { };
|
2009-03-07 23:57:03 +00:00
|
|
|
|
|
|
|
// RUN: grep _ZplRK1YRA100_P1X %t | count 1 &&
|
2009-02-13 00:10:09 +00:00
|
|
|
bool operator+(const Y&, X* (&xs)[100]) { return false; }
|
|
|
|
|
2009-03-07 23:57:03 +00: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-10 17:07:44 +00:00
|
|
|
// RUN: grep _Z1f1u %t | count 1 &&
|
2009-03-07 23:57:03 +00:00
|
|
|
typedef union { int a; } u;
|
|
|
|
void f(u) { }
|
2009-03-10 17:07:44 +00:00
|
|
|
|
|
|
|
// RUN: grep _Z1f1x %t | count 1
|
|
|
|
typedef struct { int a; } x,y;
|
|
|
|
void f(y) { }
|
|
|
|
|
2009-04-01 00:15:23 +00:00
|
|
|
// RUN: grep _Z1fv %t | count 1
|
|
|
|
void f() { }
|
2009-04-01 00:58:25 +00:00
|
|
|
|
|
|
|
// RUN: grep _ZN1N1fEv %t | count 1
|
|
|
|
namespace N { void f() { } }
|
|
|
|
|
|
|
|
// RUN: grep _ZN1N1N1fEv %t | count 1
|
|
|
|
namespace N { namespace N { void f() { } } }
|