blob: dbb4db81f67ad62bacbe82031e49cf5a25c49142 [file] [log] [blame]
Will Wilson67c41ba2014-12-13 04:31:07 +00001// RUN: %clang_cc1 -fsyntax-only -ast-print %s | FileCheck %s
2
3namespace NamedEnumNS
4{
5
6enum NamedEnum
7{
8 Val0,
9 Val1
10};
11
12template <NamedEnum E>
13void foo();
14
15void test() {
Paul Robinsonf1838482017-12-21 21:47:22 +000016 // CHECK: template<> void foo<NamedEnumNS::Val0>()
Will Wilson67c41ba2014-12-13 04:31:07 +000017 NamedEnumNS::foo<Val0>();
Paul Robinsonf1838482017-12-21 21:47:22 +000018 // CHECK: template<> void foo<NamedEnumNS::Val1>()
Will Wilson67c41ba2014-12-13 04:31:07 +000019 NamedEnumNS::foo<(NamedEnum)1>();
Serge Pavlova67a4d22016-11-10 08:49:37 +000020 // CHECK: template<> void foo<2>()
Will Wilson67c41ba2014-12-13 04:31:07 +000021 NamedEnumNS::foo<(NamedEnum)2>();
22}
23
24} // NamedEnumNS