1 // Test this without pch.
2 // RUN: %clang_cc1 -fexceptions -include %S/cxx-templates.h -verify %s -ast-dump -o -
3 // RUN: %clang_cc1 -fexceptions -include %S/cxx-templates.h %s -emit-llvm -o - | FileCheck %s
6 // RUN: %clang_cc1 -fexceptions -x c++-header -emit-pch -o %t %S/cxx-templates.h
7 // RUN: %clang_cc1 -fexceptions -include-pch %t -verify %s -ast-dump -o -
8 // RUN: %clang_cc1 -fexceptions -include-pch %t %s -emit-llvm -o - | FileCheck %s
10 // CHECK: define weak_odr void @_ZN2S4IiE1mEv
11 // CHECK: define linkonce_odr void @_ZN2S3IiE1mEv
17 static T my_templf(T x) { return x; }
20 void test(const int (&a6)[17]) {
21 int x = templ_f<int, 5>(3);
23 S<char, float>::templ();
24 S<int, char>::partial();
25 S<int, float>::explicit_special();
36 S6<const int[17]>::t2 b6 = a6;
39 template struct S4<int>;
43 namespace ZeroLengthExplicitTemplateArgs {
44 template void f<X>(X*);