1// RUN: %clang_cc1 %s -triple=x86_64-apple-darwin10 -emit-llvm -o - | FileCheck %s
2
3// CHECK: ; ModuleID
4struct A {
5  template<typename T>
6  A(T);
7};
8
9template<typename T> A::A(T) {}
10
11struct B {
12  template<typename T>
13  B(T);
14};
15
16template<typename T> B::B(T) {}
17
18// CHECK-LABEL: define weak_odr void @_ZN1BC2IiEET_(%struct.B* %this, i32) unnamed_addr
19// CHECK-LABEL: define weak_odr void @_ZN1BC1IiEET_(%struct.B* %this, i32) unnamed_addr
20template B::B(int);
21
22template<typename T>
23struct C {
24  void f() {
25    int a[] = { 1, 2, 3 };
26  }
27};
28
29void f(C<int>& c) {
30  c.f();
31}
32