1*f4a2713aSLionel Sambuc // RUN: %clang_cc1 -std=c++11 -triple x86_64-apple-darwin10 -emit-llvm -o - %s | FileCheck %s 2*f4a2713aSLionel Sambuc 3*f4a2713aSLionel Sambuc template<typename T> struct alloc {}; 4*f4a2713aSLionel Sambuc template<typename T> using Alloc = alloc<T>; 5*f4a2713aSLionel Sambuc template<typename T, typename A = Alloc<T>> struct vector {}; 6*f4a2713aSLionel Sambuc 7*f4a2713aSLionel Sambuc template<typename T> using Vec = vector<T>; 8*f4a2713aSLionel Sambuc 9*f4a2713aSLionel Sambuc template<typename T> void f(Vec<T> v); 10*f4a2713aSLionel Sambuc template<typename T> void g(T); 11*f4a2713aSLionel Sambuc 12*f4a2713aSLionel Sambuc template<template<typename> class F> void h(F<int>); 13*f4a2713aSLionel Sambuc 14*f4a2713aSLionel Sambuc template<typename,typename,typename> struct S {}; 15*f4a2713aSLionel Sambuc template<typename T, typename U> using U = S<T, int, U>; 16*f4a2713aSLionel Sambuc template<typename...Ts> void h(U<Ts...>, Ts...); 17*f4a2713aSLionel Sambuc 18*f4a2713aSLionel Sambuc // CHECK-LABEL: define void @_Z1zv( 19*f4a2713aSLionel Sambuc void z() { 20*f4a2713aSLionel Sambuc vector<int> VI; 21*f4a2713aSLionel Sambuc f(VI); 22*f4a2713aSLionel Sambuc // CHECK: call void @_Z1fIiEv6vectorIT_5allocIS1_EE( 23*f4a2713aSLionel Sambuc 24*f4a2713aSLionel Sambuc Vec<double> VD; 25*f4a2713aSLionel Sambuc g(VD); 26*f4a2713aSLionel Sambuc // CHECK: call void @_Z1gI6vectorId5allocIdEEEvT_( 27*f4a2713aSLionel Sambuc 28*f4a2713aSLionel Sambuc h<Vec>(VI); 29*f4a2713aSLionel Sambuc // CHECK: call void @_Z1hI3VecEvT_IiE( 30*f4a2713aSLionel Sambuc 31*f4a2713aSLionel Sambuc Alloc<int> AC; 32*f4a2713aSLionel Sambuc h(AC); 33*f4a2713aSLionel Sambuc // CHECK: call void @_Z1hI5allocEvT_IiE( 34*f4a2713aSLionel Sambuc 35*f4a2713aSLionel Sambuc h<Alloc>(AC); 36*f4a2713aSLionel Sambuc // CHECK: call void @_Z1hI5AllocEvT_IiE( 37*f4a2713aSLionel Sambuc 38*f4a2713aSLionel Sambuc Vec<char> VC; 39*f4a2713aSLionel Sambuc g<Vec<char>>(VC); 40*f4a2713aSLionel Sambuc // CHECK: call void @_Z1gI6vectorIc5allocIcEEEvT_( 41*f4a2713aSLionel Sambuc 42*f4a2713aSLionel Sambuc Vec<Vec<int>> VVI; 43*f4a2713aSLionel Sambuc g(VVI); 44*f4a2713aSLionel Sambuc // CHECK: call void @_Z1gI6vectorIS0_Ii5allocIiEES1_IS3_EEEvT_( 45*f4a2713aSLionel Sambuc 46*f4a2713aSLionel Sambuc // CHECK: call void @_Z1hIJidEEv1UIDpT_ES2_ 47*f4a2713aSLionel Sambuc h({}, 0, 0.0); 48*f4a2713aSLionel Sambuc } 49