Clang Project

clang_source_code/test/Sema/complex-promotion.c
1// RUN: %clang_cc1 %s -verify -fsyntax-only
2// expected-no-diagnostics
3
4float a;
5
6int b[__builtin_classify_type(a + 1i) == 9 ? 1 : -1];
7int c[__builtin_classify_type(1i + a) == 9 ? 1 : -1];
8
9double d;
10__typeof__ (d + 1i) e;
11
12int f[sizeof(e) == 2 * sizeof(double) ? 1 : -1];
13
14int g;
15int h[__builtin_classify_type(g + 1.0i) == 9 ? 1 : -1];
16int i[__builtin_classify_type(1.0i + a) == 9 ? 1 : -1];
17