[docs] Add LICENSE.txt to the root of the mono-repo
[llvm-project.git] / clang / test / Coverage / ast-print-temp-class.cpp
blobf6b94efb927fa4a33ebff9cb21a6643f46924215
1 // RUN: %clang_cc1 -ast-print -std=c++14 %s -v -o %t.1.cpp
2 // RUN: %clang_cc1 -ast-print -std=c++14 %t.1.cpp -o %t.2.cpp
3 // RUN: diff %t.1.cpp %t.2.cpp
5 // Specializations
7 template<typename T> class C0 {};
8 template<> class C0<long> {};
9 template<> class C0<long*> {};
10 C0<int> c0;
12 template<int N> class C1 {};
13 template<> class C1<11> {};
14 C1<2> c1a;
15 C1<4> c1b;
17 template<typename T> class C2a {};
18 template<typename T> class C2b {};
19 template<template<typename T> class TC> class C2 {};
20 template<> class C2<C2a> {};
21 C2<C2b> c2;
24 // Default arguments
26 template<typename T = int> class C10 {};
27 template<int N = 10> class C11 {};
28 template<typename T, int N = 22> class C12a {};
29 //FIXME: template<template<typename T, int N> class TC = C12a> class C12 {};
30 //FIXME: template<template<typename T> class TC = C12a> class C13 {};
33 // Partial specializations
35 template<typename T, typename U> struct C20 {
36 T a;
37 U b;
39 template<typename T> struct C20<T, int> {
40 T a;
43 template<int N, typename U> struct C21 {
44 U a;
45 U b[N];
47 template<int N> struct C21<N, int> {
48 int a[N];
51 template<template<typename T2> class TC, typename U> struct C22 {
52 TC<U> a;
53 U b;
55 template<template<typename T2> class TC> struct C22<TC, int> {
56 TC<int> a;
60 // Declaration only
61 template<typename T> class C30;
62 template<> class C30<long>;
63 template<> class C30<long*>;
64 extern C30<int> c30;