Revert "[llvm] Improve llvm.objectsize computation by computing GEP, alloca and mallo...
[llvm-project.git] / clang / test / CXX / temp / temp.decls / temp.alias / p2.cpp
bloba5b39fe5c51f70c810f3cad21a06f6b410ce0603
1 // RUN: %clang_cc1 -std=c++11 -fsyntax-only -verify %s
3 template<typename T> using U = T;
5 using I = U<U<U<U<int>>>>;
6 using I = int;
8 template<typename A, typename B> using Fst = A;
9 template<typename A, typename B> using Snd = B;
11 using I = Fst<Snd<char,int>,double>;
13 namespace StdExample {
14 // Prerequisites for example.
15 template<class T, class A> struct vector { /* ... */ };
18 template<class T> struct Alloc {};
19 template<class T> using Vec = vector<T, Alloc<T>>;
20 Vec<int> v;
22 template<class T>
23 void process(Vec<T>& v) // expected-note {{previous definition is here}}
24 { /* ... */ }
26 template<class T>
27 void process(vector<T, Alloc<T>>& w) // expected-error {{redefinition of 'process'}}
28 { /* ... */ }
30 template<template<class> class TT>
31 void f(TT<int>); // expected-note {{candidate template ignored}}
33 template<template<class,class> class TT>
34 void g(TT<int, Alloc<int>>);
36 int h() {
37 f(v); // expected-error {{no matching function for call to 'f'}}
38 g(v); // OK: TT = vector
42 // v's type is same as vector<int, Alloc<int>>.
43 using VTest = vector<int, Alloc<int>>;
44 using VTest = decltype(v);