1 // Test this without pch.
2 // RUN: %clang_cc1 -x c++ -std=c++11 -include %S/cxx-alias-decl.h -fsyntax-only -emit-llvm -o - %s
3 
4 // Test with pch.
5 // RUN: %clang_cc1 -x c++ -std=c++11 -emit-pch -o %t %S/cxx-alias-decl.h
6 // RUN: %clang_cc1 -x c++ -std=c++11 -include-pch %t -fsyntax-only -emit-llvm -o - %s
7 
8 // RUN: %clang_cc1 -x c++ -std=c++11 -emit-pch -fpch-instantiate-templates -o %t %S/cxx-alias-decl.h
9 // RUN: %clang_cc1 -x c++ -std=c++11 -include-pch %t -fsyntax-only -emit-llvm -o - %s
10 
11 template struct T<S>;
12 C<A>::A<char> a;
13 
14 using T1 = decltype(a);
15 using T1 = D<int, char>;
16 
17 using T2 = B<A>;
18 using T2 = S;
19 
20 using A = int;
21 template<typename U> using B = S;
22 template<typename U> using C = T<U>;
23 template<typename U, typename V> using D = typename T<U>::template A<V>;
24