view clang/test/SemaTemplate/default-arguments-ast-print.cpp @ 236:c4bab56944e8 llvm-original

LLVM 16
author kono
date Wed, 09 Nov 2022 17:45:10 +0900
parents 5f17cb93ff66
children
line wrap: on
line source

// RUN: %clang_cc1 -fsyntax-only -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;
}