summaryrefslogtreecommitdiffstats
path: root/clang/test/Sema/enum-constant-type.cpp
blob: 5db3a859a39599ce44c10b9d4bcc5f84d01515b4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
// RUN: %clang_cc1 -x c++ -fsyntax-only -verify %s -Wenum-compare
// expected-no-diagnostics

enum E1 {
  E11 = 0
};

enum E2 {
  E21 = 0,
  E22 = E11,
  E23 = E21 + E22
};