comparison clang/test/SemaTemplate/temp_arg_enum_printing.cpp @ 150:1d019706d866

LLVM10
author anatofuz
date Thu, 13 Feb 2020 15:10:13 +0900
parents
children 2e18cbf3894f
comparison
equal deleted inserted replaced
147:c2174574ed3a 150:1d019706d866
1 // RUN: %clang_cc1 -fsyntax-only -ast-print %s | FileCheck %s
2
3 namespace NamedEnumNS
4 {
5
6 enum NamedEnum
7 {
8 Val0,
9 Val1
10 };
11
12 template <NamedEnum E>
13 void foo();
14
15 void test() {
16 // CHECK: template<> void foo<NamedEnumNS::Val0>()
17 NamedEnumNS::foo<Val0>();
18 // CHECK: template<> void foo<NamedEnumNS::Val1>()
19 NamedEnumNS::foo<(NamedEnum)1>();
20 // CHECK: template<> void foo<2>()
21 NamedEnumNS::foo<(NamedEnum)2>();
22 }
23
24 } // NamedEnumNS