aboutsummaryrefslogtreecommitdiff
path: root/clang/test/SemaTemplate/temp_arg_enum_printing.cpp
blob: bf343af9635943309c5f26a13d2e72fe5e4048ab (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

namespace NamedEnumNS
{
  
enum class NamedEnum
{
  Val0,
  Val1
};
  
template <NamedEnum E>
void foo();
  
void test() {
  // CHECK: template<> void foo<NamedEnumNS::NamedEnum::Val0>()
  NamedEnumNS::foo<NamedEnum::Val0>();
  // CHECK: template<> void foo<NamedEnumNS::NamedEnum::Val1>()
  NamedEnumNS::foo<(NamedEnum)1>();
  // CHECK: template<> void foo<(NamedEnumNS::NamedEnum)2>()
  NamedEnumNS::foo<(NamedEnum)2>();
}
  
} // NamedEnumNS