[clang][lex] NFCI: Use DirectoryEntryRef in ModuleMap::inferFrameworkModule()
[llvm-project.git] / clang / test / SemaTemplate / enum-argument.cpp
blob7ff41961399017ff9d8dc87e4c197cc7ef6a2c1e
1 // RUN: %clang_cc1 -fsyntax-only -verify %s
2 // expected-no-diagnostics
4 enum Enum { val = 1 };
5 template <Enum v> struct C {
6 typedef C<v> Self;
7 };
8 template struct C<val>;
10 template<typename T>
11 struct get_size {
12 static const unsigned value = sizeof(T);
15 template<typename T>
16 struct X0 {
17 enum {
18 Val1 = get_size<T>::value,
19 Val2,
20 SumOfValues = Val1 + Val2
24 X0<int> x0i;
26 namespace rdar8020920 {
27 template<typename T>
28 struct X {
29 enum { e0 = 32 };
31 unsigned long long bitfield : e0;
33 void f(int j) {
34 bitfield + j;