| 1 |
// RUN: %clang_cc1 -triple x86_64-linux -std=c++14 %s -emit-llvm -o - | FileCheck %s |
| 2 |
// RUN: %clang_cc1 -triple x86_64-linux -std=c++17 %s -emit-llvm -o - | FileCheck %s |
| 3 |
|
| 4 |
namespace std { |
| 5 |
template<typename T> class initializer_list { |
| 6 |
const T *data; |
| 7 |
__SIZE_TYPE__ size; |
| 8 |
|
| 9 |
public: |
| 10 |
initializer_list(); |
| 11 |
}; |
| 12 |
} |
| 13 |
|
| 14 |
namespace ParenBraceInitList { |
| 15 |
struct Vector { |
| 16 |
Vector(std::initializer_list<int>); |
| 17 |
~Vector(); |
| 18 |
}; |
| 19 |
|
| 20 |
struct Base { Base(Vector) {} }; |
| 21 |
|
| 22 |
// CHECK: define {{.*}}18ParenBraceInitList1fILi0EE |
| 23 |
template<int> void f() { |
| 24 |
// CHECK: call {{.*}}18ParenBraceInitList6VectorC1 |
| 25 |
// CHECK: call {{.*}}18ParenBraceInitList6VectorD1 |
| 26 |
Base({0}); |
| 27 |
} |
| 28 |
template void f<0>(); |
| 29 |
} |