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