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