blob: ecd56aa40f6ee97d6b9fe8c5f5dac2461784ff87 [file] [log] [blame]
Shih-wei Liaof8fd82b2010-02-10 11:10:31 -08001_Complex cd; // CHECK: code-complete-errors.c:1:1: warning: plain '_Complex' requires a type specifier; assuming '_Complex double'
2// CHECK: FIX-IT: Insert " double" at 1:9
3struct s {
4 int x, y;; // CHECK: code-complete-errors.c:4:12: warning: extra ';' inside a struct or union
5}; // CHECK: FIX-IT: Remove 4:12-4:13
6
7struct s s0 = { y: 5 }; // CHECK: code-complete-errors.c:7:20: warning: use of GNU old-style field designator extension
8// CHECK: FIX-IT: Replace 7:17-7:19 with ".y = "
9int f(int *ptr1, float *ptr2) {
10 return ptr1 != ptr2; // CHECK: code-complete-errors.c:10:15:{10:10-10:14}{10:18-10:22}: warning: comparison of distinct pointer types ('int *' and 'float *')
11}
12
13void g() { }
14
15// RUN: c-index-test -code-completion-at=%s:13:12 -pedantic %s 2> %t
16// RUN: FileCheck -check-prefix=CHECK %s < %t