2014-12-13 12:31:07 +08:00
|
|
|
// RUN: %clang_cc1 -fsyntax-only -ast-print %s | FileCheck %s
|
|
|
|
|
|
|
|
namespace NamedEnumNS
|
|
|
|
{
|
|
|
|
|
|
|
|
enum NamedEnum
|
|
|
|
{
|
|
|
|
Val0,
|
|
|
|
Val1
|
|
|
|
};
|
|
|
|
|
|
|
|
template <NamedEnum E>
|
|
|
|
void foo();
|
|
|
|
|
|
|
|
void test() {
|
2017-12-22 05:47:22 +08:00
|
|
|
// CHECK: template<> void foo<NamedEnumNS::Val0>()
|
2014-12-13 12:31:07 +08:00
|
|
|
NamedEnumNS::foo<Val0>();
|
2017-12-22 05:47:22 +08:00
|
|
|
// CHECK: template<> void foo<NamedEnumNS::Val1>()
|
2014-12-13 12:31:07 +08:00
|
|
|
NamedEnumNS::foo<(NamedEnum)1>();
|
2021-05-13 01:28:41 +08:00
|
|
|
// CHECK: template<> void foo<(NamedEnumNS::NamedEnum)2>()
|
2014-12-13 12:31:07 +08:00
|
|
|
NamedEnumNS::foo<(NamedEnum)2>();
|
|
|
|
}
|
|
|
|
|
|
|
|
} // NamedEnumNS
|