13f1b5d07SRichard Smith // Test this without pch.
29ca5c425SRichard Smith // RUN: %clang_cc1 -x c++ -std=c++11 -include %S/cxx-alias-decl.h -fsyntax-only -emit-llvm -o - %s
33f1b5d07SRichard Smith 
43f1b5d07SRichard Smith // Test with pch.
59ca5c425SRichard Smith // RUN: %clang_cc1 -x c++ -std=c++11 -emit-pch -o %t %S/cxx-alias-decl.h
69ca5c425SRichard Smith // RUN: %clang_cc1 -x c++ -std=c++11 -include-pch %t -fsyntax-only -emit-llvm -o - %s
73f1b5d07SRichard Smith 
8*a45f713cSLuboš Luňák // RUN: %clang_cc1 -x c++ -std=c++11 -emit-pch -fpch-instantiate-templates -o %t %S/cxx-alias-decl.h
9*a45f713cSLuboš Luňák // RUN: %clang_cc1 -x c++ -std=c++11 -include-pch %t -fsyntax-only -emit-llvm -o - %s
10*a45f713cSLuboš Luňák 
113f1b5d07SRichard Smith template struct T<S>;
123f1b5d07SRichard Smith C<A>::A<char> a;
133f1b5d07SRichard Smith 
143f1b5d07SRichard Smith using T1 = decltype(a);
153f1b5d07SRichard Smith using T1 = D<int, char>;
163f1b5d07SRichard Smith 
173f1b5d07SRichard Smith using T2 = B<A>;
183f1b5d07SRichard Smith using T2 = S;
193f1b5d07SRichard Smith 
203f1b5d07SRichard Smith using A = int;
213f1b5d07SRichard Smith template<typename U> using B = S;
223f1b5d07SRichard Smith template<typename U> using C = T<U>;
233f1b5d07SRichard Smith template<typename U, typename V> using D = typename T<U>::template A<V>;
24