1 // RUN: not %clang_cc1 -std=c++11 -fsyntax-only -fno-diagnostics-show-line-numbers -fcaret-diagnostics-max-lines=5 %s 2>&1 | FileCheck %s -strict-whitespace
4 //CHECK: {{.*}}: error: excess elements in scalar initializer
5 //CHECK-NEXT: {{^}}_Complex double gz1 = {1, 2, 3};
6 //CHECK-NEXT: {{^}} ^{{$}}
7 _Complex
double gz1
= {1, 2, 3};
9 //CHECK: {{.*}}: error: excess elements in scalar initializer
10 //CHECK-NEXT: {{^}}_Complex double dd = {1.0, 2.0, 3.0};
11 //CHECK-NEXT: {{^}} ^~~{{$}}
12 _Complex
double dd
= {1.0, 2.0, 3.0};
14 //CHECK: {{.*}}: error: excess elements in scalar initializer
15 //CHECK-NEXT: {{^}}_Complex float fd = {1.0, 2.0, 3.0, 4.0, 5.0};
16 //CHECK-NEXT: {{^}} ^~~{{$}}
17 _Complex
float fd
= {1.0, 2.0, 3.0, 4.0, 5.0};
19 //CHECK: {{.*}}: error: no viable conversion from 'foo' to 'double'
20 //CHECK-NEXT: {{^}}_Complex double ds = {f, 1.0, b};
21 //CHECK-NEXT: {{^}} ^{{$}}
27 _Complex
double ds
= {f
, 1.0, b
};
29 //CHECK: {{.*}}: error: no viable conversion from 'foo' to 'double'
30 //CHECK-NEXT: {{^}}_Complex double fg = {1.0, f};
31 //CHECK-NEXT: {{^}} ^{{$}}
32 _Complex
double fg
= {1.0, f
};
35 //CHECK: {{.*}}: error: excess elements in scalar initializer
36 //CHECK-NEXT: {{^}}_Complex double gg = {1.0, 2.0, f};
37 //CHECK-NEXT: {{^}} ^{{$}}
38 //CHECK-NEXT: {{^}}6 errors generated.
39 _Complex
double gg
= {1.0, 2.0, f
};