diff options
author | Douglas Gregor <dgregor@apple.com> | 2010-01-29 00:41:11 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2010-01-29 00:41:11 +0000 |
commit | 51c6d384551674facc19f745ecf6e289d28dc55f (patch) | |
tree | 1fd7ba39432b3ebd0fc240ffb0703d7c51ffca5a /test/Index/code-complete-errors.c | |
parent | e729acbba75903f42e79e72e46cdebe3f4c35521 (diff) |
When printing diagnostics in c-index-test, also print source ranges
and fix-it information, so we can see everything in one place. Along
the way, fix a few bugs with deserialization and query of diagnostics
in CIndex.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94768 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Index/code-complete-errors.c')
-rw-r--r-- | test/Index/code-complete-errors.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/test/Index/code-complete-errors.c b/test/Index/code-complete-errors.c index 43bc5d8a1a..ecd56aa40f 100644 --- a/test/Index/code-complete-errors.c +++ b/test/Index/code-complete-errors.c @@ -1,16 +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;; -}; + 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: warning: comparison of distinct pointer types ('int *' and 'float *') + 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 %s 2> %t +// RUN: c-index-test -code-completion-at=%s:13:12 -pedantic %s 2> %t // RUN: FileCheck -check-prefix=CHECK %s < %t |