2009-12-16 04:14:24 +08:00
|
|
|
// RUN: %clang_cc1 -emit-llvm -o - %s -O2 | grep "ret i32 1"
|
2011-09-09 01:18:35 +08:00
|
|
|
typedef long Integer;
|
|
|
|
typedef enum : Integer { Red, Green, Blue} Color;
|
|
|
|
typedef enum { Cyan, Magenta, Yellow, Key } PrintColor;
|
2009-03-08 04:17:55 +08:00
|
|
|
|
|
|
|
int a() {
|
2011-09-09 01:18:35 +08:00
|
|
|
return @encode(int) == @encode(int) &&
|
|
|
|
@encode(Color) == @encode(long) &&
|
|
|
|
@encode(PrintColor) == @encode(int);
|
2009-03-08 04:17:55 +08:00
|
|
|
}
|