blob: 1a657408f8a61ac85f57c61f834113c860c2628e [file] [log] [blame]
Richard Smith762bb9d2011-10-13 22:29:44 +00001// RUN: %clang_cc1 -fsyntax-only -pedantic -std=c++11 -verify -triple x86_64-apple-darwin %s
Douglas Gregora61b3e72010-12-01 17:42:47 +00002
3enum E {};
4
Richard Smith61802452011-12-22 02:22:31 +00005struct Z {};
Douglas Gregora61b3e72010-12-01 17:42:47 +00006typedef int Integer;
7
8struct X {
9 enum E : 1;
10 enum E : Z; // expected-error{{invalid underlying type}}
11 enum E2 : int;
12 enum E3 : Integer;
13};
14
15struct Y {
16 enum E : int(2);
Richard Smith61802452011-12-22 02:22:31 +000017 enum E : Z(); // expected-error{{not an integer constant}}
Douglas Gregora61b3e72010-12-01 17:42:47 +000018};