1 // RUN: %clang_cc1 -fsyntax-only -verify %s 2 template<typename T> struct A { }; 3 4 // bullet 1 5 template<typename T> A<T> f0(T* ptr); 6 test_f0_bullet1()7void test_f0_bullet1() { 8 int arr0[6]; 9 A<int> a0 = f0(arr0); 10 const int arr1[] = { 1, 2, 3, 4, 5 }; 11 A<const int> a1 = f0(arr1); 12 } 13 14 // bullet 2 15 int g0(int, int); 16 float g1(float); 17 test_f0_bullet2()18void test_f0_bullet2() { 19 A<int(int, int)> a0 = f0(g0); 20 A<float(float)> a1 = f0(g1); 21 } 22 23 // bullet 3 24 struct X { }; 25 const X get_X(); 26 27 template<typename T> A<T> f1(T); 28 test_f1_bullet3()29void test_f1_bullet3() { 30 A<X> a0 = f1(get_X()); 31 } 32