2009-12-16 04:14:24 +08:00
|
|
|
// RUN: %clang_cc1 %s -triple=x86_64-apple-darwin10 -emit-llvm -o - | FileCheck %s
|
2009-11-24 13:16:24 +08:00
|
|
|
|
|
|
|
// CHECK: ; ModuleID
|
|
|
|
struct A {
|
|
|
|
template<typename T>
|
|
|
|
A(T);
|
|
|
|
};
|
|
|
|
|
|
|
|
template<typename T> A::A(T) {}
|
2009-11-24 13:36:32 +08:00
|
|
|
|
|
|
|
struct B {
|
|
|
|
template<typename T>
|
|
|
|
B(T);
|
|
|
|
};
|
|
|
|
|
|
|
|
template<typename T> B::B(T) {}
|
|
|
|
|
2021-11-09 01:09:49 +08:00
|
|
|
// CHECK-LABEL: define weak_odr void @_ZN1BC2IiEET_(%struct.B* {{[^,]*}} %this, i32 %0) unnamed_addr
|
|
|
|
// CHECK-LABEL: define weak_odr void @_ZN1BC1IiEET_(%struct.B* {{[^,]*}} %this, i32 %0) unnamed_addr
|
2009-11-24 13:36:32 +08:00
|
|
|
template B::B(int);
|
2009-11-25 00:52:50 +08:00
|
|
|
|
|
|
|
template<typename T>
|
|
|
|
struct C {
|
|
|
|
void f() {
|
|
|
|
int a[] = { 1, 2, 3 };
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
void f(C<int>& c) {
|
|
|
|
c.f();
|
|
|
|
}
|