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 // CHECK-LABEL: define void @_Z1zv( z()15*f4a2713aSLionel Sambucvoid z() { 16*f4a2713aSLionel Sambuc vector<int> VI; 17*f4a2713aSLionel Sambuc f(VI); 18*f4a2713aSLionel Sambuc // CHECK: call void @_Z1fIiEv6vectorIT_5allocIS1_EE( 19*f4a2713aSLionel Sambuc 20*f4a2713aSLionel Sambuc Vec<double> VD; 21*f4a2713aSLionel Sambuc g(VD); 22*f4a2713aSLionel Sambuc // CHECK: call void @_Z1gI6vectorId5allocIdEEEvT_( 23*f4a2713aSLionel Sambuc 24*f4a2713aSLionel Sambuc h<Vec>(VI); 25*f4a2713aSLionel Sambuc // CHECK: call void @_Z1hI3VecEvT_IiE( 26*f4a2713aSLionel Sambuc 27*f4a2713aSLionel Sambuc Alloc<int> AC; 28*f4a2713aSLionel Sambuc h(AC); 29*f4a2713aSLionel Sambuc // CHECK: call void @_Z1hI5allocEvT_IiE( 30*f4a2713aSLionel Sambuc 31*f4a2713aSLionel Sambuc h<Alloc>(AC); 32*f4a2713aSLionel Sambuc // CHECK: call void @_Z1hI5AllocEvT_IiE( 33*f4a2713aSLionel Sambuc 34*f4a2713aSLionel Sambuc Vec<char> VC; 35*f4a2713aSLionel Sambuc g<Vec<char>>(VC); 36*f4a2713aSLionel Sambuc // CHECK: call void @_Z1gI6vectorIc5allocIcEEEvT_( 37*f4a2713aSLionel Sambuc 38*f4a2713aSLionel Sambuc Vec<Vec<int>> VVI; 39*f4a2713aSLionel Sambuc g(VVI); 40*f4a2713aSLionel Sambuc // CHECK: call void @_Z1gI6vectorIS0_Ii5allocIiEES1_IS3_EEEvT_( 41*f4a2713aSLionel Sambuc } 42