summaryrefslogtreecommitdiffstats
path: root/test/Index/code-complete-errors.c
diff options
context:
space:
mode:
authorrdivacky <rdivacky@FreeBSD.org>2010-02-16 09:31:36 +0000
committerrdivacky <rdivacky@FreeBSD.org>2010-02-16 09:31:36 +0000
commitfd035e6496665b1f1197868e21cb0a4594e8db6e (patch)
tree53010172e19c77ea447bcd89e117cda052ab52e0 /test/Index/code-complete-errors.c
parent2fce988e86bc01829142e4362d4eff1af0925147 (diff)
downloadFreeBSD-src-fd035e6496665b1f1197868e21cb0a4594e8db6e.zip
FreeBSD-src-fd035e6496665b1f1197868e21cb0a4594e8db6e.tar.gz
Update clang to r96341.
Diffstat (limited to 'test/Index/code-complete-errors.c')
-rw-r--r--test/Index/code-complete-errors.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/test/Index/code-complete-errors.c b/test/Index/code-complete-errors.c
new file mode 100644
index 0000000..520a8c8
--- /dev/null
+++ b/test/Index/code-complete-errors.c
@@ -0,0 +1,16 @@
+_Complex cd; // CHECK: code-complete-errors.c:1:1: warning: plain '_Complex' requires a type specifier; assuming '_Complex double'
+// CHECK: FIX-IT: Insert " double" at 1:9
+struct s {
+ int x, y;; // CHECK: code-complete-errors.c:4:12: warning: extra ';' inside a struct or union
+}; // CHECK: FIX-IT: Remove [4:12 - 4:13]
+
+struct s s0 = { y: 5 }; // CHECK: code-complete-errors.c:7:20: warning: use of GNU old-style field designator extension
+// CHECK: FIX-IT: Replace [7:17 - 7:19] with ".y = "
+int f(int *ptr1, float *ptr2) {
+ 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 *')
+}
+
+void g() { }
+
+// RUN: c-index-test -code-completion-at=%s:13:12 -pedantic %s 2> %t
+// RUN: FileCheck -check-prefix=CHECK %s < %t
OpenPOWER on IntegriCloud