2009-12-16 04:14:24 +08:00
|
|
|
// RUN: %clang_cc1 -emit-llvm %s -o %t -triple=x86_64-apple-darwin9
|
2009-06-16 11:37:31 +08:00
|
|
|
|
|
|
|
struct T {
|
|
|
|
T();
|
|
|
|
~T();
|
|
|
|
};
|
|
|
|
|
|
|
|
void f(const T& t = T());
|
|
|
|
|
2009-08-06 02:17:32 +08:00
|
|
|
class X { // ...
|
|
|
|
public:
|
|
|
|
X();
|
|
|
|
X(const X&, const T& t = T());
|
|
|
|
};
|
|
|
|
|
2009-06-16 11:37:31 +08:00
|
|
|
void g() {
|
2009-11-08 09:45:36 +08:00
|
|
|
// RUN: grep "call void @_ZN1TC1Ev" %t | count 4
|
|
|
|
// RUN: grep "call void @_ZN1TD1Ev" %t | count 4
|
2009-06-16 11:37:31 +08:00
|
|
|
f();
|
|
|
|
f();
|
2009-08-06 02:17:32 +08:00
|
|
|
|
|
|
|
X a;
|
|
|
|
X b(a);
|
|
|
|
X c = a;
|
2009-06-16 11:37:31 +08:00
|
|
|
}
|
2009-10-18 23:18:11 +08:00
|
|
|
|
|
|
|
|
|
|
|
// RUN: grep memset %t
|
|
|
|
class obj{ int a; float b; double d; };
|
|
|
|
void h() {
|
|
|
|
obj o = obj();
|
|
|
|
}
|