mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-05-13 17:37:00 +00:00

If a default template type argument is manually specified to be of the default type, then it is committed when printing the template. Differential revision: https://reviews.llvm.org/D103040
25 lines
535 B
C++
25 lines
535 B
C++
// 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;
|
|
}
|