3
3
// Test the constant folding of builtin complex numbers.
4
4
5
5
static_assert ((0.0 + 0 .0j) == (0.0 + 0 .0j));
6
- static_assert ((0.0 + 0 .0j) != (0.0 + 0 .0j)); // expected-error {{static assertion}}
6
+ static_assert ((0.0 + 0 .0j) != (0.0 + 0 .0j)); // expected-error {{static assertion}} \
7
+ // expected-note {{evaluates to}}
7
8
8
9
static_assert ((0.0 + 0 .0j) == 0.0);
9
10
static_assert (0.0 == (0.0 + 0 .0j));
@@ -14,21 +15,29 @@ static_assert(0.0 != 1.0j);
14
15
15
16
// Walk around the complex plane stepping between angular differences and
16
17
// equality.
17
- static_assert ((1.0 + 0 .0j) == (0.0 + 0 .0j)); // expected-error {{static assertion}}
18
+ static_assert ((1.0 + 0 .0j) == (0.0 + 0 .0j)); // expected-error {{static assertion}} \
19
+ // expected-note {{evaluates to}}
18
20
static_assert ((1.0 + 0 .0j) == (1.0 + 0 .0j));
19
- static_assert ((1.0 + 1 .0j) == (1.0 + 0 .0j)); // expected-error {{static assertion}}
21
+ static_assert ((1.0 + 1 .0j) == (1.0 + 0 .0j)); // expected-error {{static assertion}} \
22
+ // expected-note {{evaluates to}}
20
23
static_assert ((1.0 + 1 .0j) == (1.0 + 1 .0j));
21
- static_assert ((0.0 + 1 .0j) == (1.0 + 1 .0j)); // expected-error {{static assertion}}
24
+ static_assert ((0.0 + 1 .0j) == (1.0 + 1 .0j)); // expected-error {{static assertion}} \
25
+ // expected-note {{evaluates to}}
22
26
static_assert ((0.0 + 1 .0j) == (0.0 + 1 .0j));
23
- static_assert ((-1.0 + 1 .0j) == (0.0 + 1 .0j)); // expected-error {{static assertion}}
27
+ static_assert ((-1.0 + 1 .0j) == (0.0 + 1 .0j)); // expected-error {{static assertion}} \
28
+ // expected-note {{evaluates to}}
24
29
static_assert ((-1.0 + 1 .0j) == (-1.0 + 1 .0j));
25
- static_assert ((-1.0 + 0 .0j) == (-1.0 + 1 .0j)); // expected-error {{static assertion}}
30
+ static_assert ((-1.0 + 0 .0j) == (-1.0 + 1 .0j)); // expected-error {{static assertion}} \
31
+ // expected-note {{evaluates to}}
26
32
static_assert ((-1.0 + 0 .0j) == (-1.0 + 0 .0j));
27
- static_assert ((-1.0 - 1 .0j) == (-1.0 + 0 .0j)); // expected-error {{static assertion}}
33
+ static_assert ((-1.0 - 1 .0j) == (-1.0 + 0 .0j)); // expected-error {{static assertion}} \
34
+ // expected-note {{evaluates to}}
28
35
static_assert ((-1.0 - 1 .0j) == (-1.0 - 1 .0j));
29
- static_assert ((0.0 - 1 .0j) == (-1.0 - 1 .0j)); // expected-error {{static assertion}}
36
+ static_assert ((0.0 - 1 .0j) == (-1.0 - 1 .0j)); // expected-error {{static assertion}} \
37
+ // expected-note {{evaluates to}}
30
38
static_assert ((0.0 - 1 .0j) == (0.0 - 1 .0j));
31
- static_assert ((1.0 - 1 .0j) == (0.0 - 1 .0j)); // expected-error {{static assertion}}
39
+ static_assert ((1.0 - 1 .0j) == (0.0 - 1 .0j)); // expected-error {{static assertion}} \
40
+ // expected-note {{evaluates to}}
32
41
static_assert ((1.0 - 1 .0j) == (1.0 - 1 .0j));
33
42
34
43
// Test basic mathematical folding of both complex and real operands.
0 commit comments