2010-01-26 13:26:39 +08:00
|
|
|
// RUN: %clang_cc1 -emit-llvm-only -g %s
|
2009-11-07 02:45:16 +08:00
|
|
|
template<typename T> struct Identity {
|
|
|
|
typedef T Type;
|
|
|
|
};
|
|
|
|
|
|
|
|
void f(Identity<int>::Type a) {}
|
2009-11-07 03:19:55 +08:00
|
|
|
void f(Identity<int> a) {}
|
|
|
|
void f(int& a) { }
|
2009-11-15 05:08:12 +08:00
|
|
|
|
|
|
|
template<typename T> struct A {
|
|
|
|
A<T> *next;
|
|
|
|
};
|
|
|
|
void f(A<int>) { }
|
2009-12-07 02:00:51 +08:00
|
|
|
|
|
|
|
struct B { };
|
|
|
|
|
|
|
|
void f() {
|
|
|
|
int B::*a = 0;
|
|
|
|
void (B::*b)() = 0;
|
|
|
|
}
|
2010-01-16 08:43:13 +08:00
|
|
|
|
|
|
|
namespace EmptyNameCrash {
|
|
|
|
struct A { A(); };
|
|
|
|
typedef struct { A x; } B;
|
|
|
|
B x;
|
|
|
|
}
|
2010-01-26 13:19:50 +08:00
|
|
|
|
|
|
|
// PR4890
|
|
|
|
namespace PR4890 {
|
|
|
|
struct X {
|
|
|
|
~X();
|
|
|
|
};
|
|
|
|
|
|
|
|
X::~X() { }
|
|
|
|
}
|
|
|
|
|
|
|
|
namespace VirtualDtor {
|
|
|
|
struct Y {
|
|
|
|
virtual ~Y();
|
|
|
|
};
|
|
|
|
|
|
|
|
Y::~Y() { }
|
|
|
|
}
|
2010-01-26 13:26:39 +08:00
|
|
|
|
|
|
|
namespace VirtualBase {
|
|
|
|
struct A { };
|
|
|
|
struct B : virtual A { };
|
|
|
|
|
|
|
|
void f() {
|
|
|
|
B b;
|
|
|
|
}
|
|
|
|
}
|
2010-08-24 02:26:10 +08:00
|
|
|
|
|
|
|
void foo() {
|
|
|
|
const wchar_t c = L'x';
|
|
|
|
wchar_t d = c;
|
|
|
|
}
|
2011-09-02 05:49:51 +08:00
|
|
|
|
|
|
|
namespace b5249287 {
|
|
|
|
template <typename T> class A {
|
|
|
|
struct B;
|
|
|
|
};
|
|
|
|
|
|
|
|
class Cls {
|
|
|
|
template <typename T> friend class A<T>::B;
|
|
|
|
};
|
|
|
|
|
|
|
|
Cls obj;
|
|
|
|
}
|