aboutsummaryrefslogtreecommitdiff
path: root/clang/test/SemaTemplate/default-arguments-ast-print.cpp
blob: 1491df40588b1ce03215d19509c0f85a26426b90 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
// RUN: %clang_cc1 -ast-print %s | FileCheck %s

template <typename T, typename U = double> class Foo;

template <> class Foo<int, double> { int method1(); };

using int_type = int;

int Foo<int_type, double>::method1() {
  // CHECK: int Foo<int_type, double>::method1()
  return 10;
}

int test_typedef() {
  typedef Foo<int, double> TypedefArg;
  // CHECK: typedef Foo<int, double> TypedefArg;
  return 10;
}

int test_typedef2() {
  typedef Foo<int> TypedefArg;
  // CHECK: typedef Foo<int> TypedefArg;
  return 10;
}