[clang] Implement lifetime analysis for lifetime_capture_by(X) (#115921)
[llvm-project.git] / clang / test / SemaTemplate / instantiate-enum.cpp
blob701d1919b27d55c51c2d4e74a7ce53478157bf3f
1 // RUN: %clang_cc1 -fsyntax-only %s
3 template<typename T, T I, int J>
4 struct adder {
5 enum {
6 value = I + J,
7 value2
8 };
9 };
11 int array1[adder<long, 3, 4>::value == 7? 1 : -1];
13 namespace PR6375 {
14 template<typename T>
15 void f() {
16 enum Enum
18 enumerator1 = 0xFFFFFFF,
19 enumerator2 = enumerator1 - 1
22 int xb1 = enumerator1;
23 int xe1 = enumerator2;
26 template void f<int>();
29 namespace EnumScoping {
31 template <typename T>
32 struct C {
33 struct X {};
34 enum {
35 value = 42
39 void f(int i, C<int>::X c) {
40 int value;