Daniel Dunbar | a572887 | 2009-12-15 20:14:24 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 %s -verify -fsyntax-only |
Andy Gibbs | 8e8fb3b | 2012-10-19 12:44:48 +0000 | [diff] [blame] | 2 | // expected-no-diagnostics |
Anders Carlsson | 5b1f3f0 | 2008-12-10 23:30:05 +0000 | [diff] [blame] | 3 | |
| 4 | float a; |
| 5 | |
| 6 | int b[__builtin_classify_type(a + 1i) == 9 ? 1 : -1]; |
| 7 | int c[__builtin_classify_type(1i + a) == 9 ? 1 : -1]; |
| 8 | |
| 9 | double d; |
| 10 | __typeof__ (d + 1i) e; |
| 11 | |
| 12 | int f[sizeof(e) == 2 * sizeof(double) ? 1 : -1]; |
Anders Carlsson | 5abfe2c | 2008-12-10 23:57:51 +0000 | [diff] [blame] | 13 | |
| 14 | int g; |
| 15 | int h[__builtin_classify_type(g + 1.0i) == 9 ? 1 : -1]; |
| 16 | int i[__builtin_classify_type(1.0i + a) == 9 ? 1 : -1]; |