Daniel Dunbar | a572887 | 2009-12-15 20:14:24 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 -emit-llvm -o - %s -O2 | grep "ret i32 1" |
Douglas Gregor | 5471bc8 | 2011-09-08 17:18:35 +0000 | [diff] [blame] | 2 | typedef long Integer; |
| 3 | typedef enum : Integer { Red, Green, Blue} Color; |
| 4 | typedef enum { Cyan, Magenta, Yellow, Key } PrintColor; |
Eli Friedman | a210f35 | 2009-03-07 20:17:55 +0000 | [diff] [blame] | 5 | |
| 6 | int a() { |
Douglas Gregor | 5471bc8 | 2011-09-08 17:18:35 +0000 | [diff] [blame] | 7 | return @encode(int) == @encode(int) && |
| 8 | @encode(Color) == @encode(long) && |
| 9 | @encode(PrintColor) == @encode(int); |
Eli Friedman | a210f35 | 2009-03-07 20:17:55 +0000 | [diff] [blame] | 10 | } |