Douglas Gregor | 0b74891 | 2009-04-14 21:18:50 +0000 | [diff] [blame] | 1 | // Header for PCH test exprs.c |
| 2 | |
| 3 | // DeclRefExpr |
| 4 | int i = 17; |
| 5 | enum Enum { Enumerator = 18 }; |
| 6 | typedef typeof(i) int_decl_ref; |
| 7 | typedef typeof(Enumerator) enum_decl_ref; |
| 8 | |
Douglas Gregor | 17fc223 | 2009-04-14 21:55:33 +0000 | [diff] [blame] | 9 | // IntegerLiteral |
Douglas Gregor | 0b74891 | 2009-04-14 21:18:50 +0000 | [diff] [blame] | 10 | typedef typeof(17) integer_literal; |
| 11 | typedef typeof(17l) long_literal; |
| 12 | |
Douglas Gregor | db600c3 | 2009-04-15 00:25:59 +0000 | [diff] [blame] | 13 | // FloatingLiteral and ParenExpr |
Douglas Gregor | c04db4f | 2009-04-14 23:59:37 +0000 | [diff] [blame] | 14 | typedef typeof((42.5)) floating_literal; |
Douglas Gregor | 17fc223 | 2009-04-14 21:55:33 +0000 | [diff] [blame] | 15 | |
| 16 | // CharacterLiteral |
Douglas Gregor | 0b74891 | 2009-04-14 21:18:50 +0000 | [diff] [blame] | 17 | typedef typeof('a') char_literal; |
Douglas Gregor | 17fc223 | 2009-04-14 21:55:33 +0000 | [diff] [blame] | 18 | |
Douglas Gregor | 0b0b77f | 2009-04-15 15:58:59 +0000 | [diff] [blame^] | 19 | // UnaryOperator |
| 20 | typedef typeof(-Enumerator) negate_enum; |
| 21 | |
| 22 | // SizeOfAlignOfExpr |
| 23 | typedef typeof(sizeof(int)) typeof_sizeof; |
| 24 | typedef typeof(sizeof(Enumerator)) typeof_sizeof2; |
| 25 | |
Douglas Gregor | db600c3 | 2009-04-15 00:25:59 +0000 | [diff] [blame] | 26 | // BinaryOperator |
| 27 | typedef typeof(i + Enumerator) add_result; |
| 28 | |
| 29 | // CStyleCastExpr |
| 30 | typedef typeof((void *)0) void_ptr; |
| 31 | |