aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/Index/annotate-tokens-pp.c2
-rw-r--r--test/Index/blocks.c1
-rw-r--r--test/Index/code-complete-errors.c9
3 files changed, 9 insertions, 3 deletions
diff --git a/test/Index/annotate-tokens-pp.c b/test/Index/annotate-tokens-pp.c
index a6e7fb99d6..3dd9ffeddc 100644
--- a/test/Index/annotate-tokens-pp.c
+++ b/test/Index/annotate-tokens-pp.c
@@ -173,7 +173,7 @@ void test() {
// CHECK: Punctuation: "," [25:26 - 25:27] UnexposedStmt=
// CHECK: Punctuation: "{" [25:28 - 25:29] UnexposedStmt=
// CHECK: Keyword: "int" [25:30 - 25:33] UnexposedStmt=
-// CHECK: Identifier: "z" [25:34 - 25:35] VarDecl=z:25:3 (Definition)
+// CHECK: Identifier: "z" [25:34 - 25:35] VarDecl=z:25:34 (Definition)
// CHECK: Punctuation: "=" [25:36 - 25:37] UnexposedStmt=
// CHECK: Identifier: "x" [25:38 - 25:39] DeclRefExpr=x:24:7
// CHECK: Punctuation: ";" [25:39 - 25:40] UnexposedStmt=
diff --git a/test/Index/blocks.c b/test/Index/blocks.c
index 5a31a21255..a8965d2aa6 100644
--- a/test/Index/blocks.c
+++ b/test/Index/blocks.c
@@ -14,7 +14,6 @@ void test() {
// CHECK: blocks.c:7:3: UnexposedStmt= Extent=[7:3 - 7:26]
// CHECK: blocks.c:7:21: VarDecl=_foo:7:21 (Definition) Extent=[7:17 - 7:25]
// CHECK: blocks.c:7:17: TypeRef=struct foo:4:8 Extent=[7:17 - 7:20]
-// CHECK: blocks.c:8:3: UnexposedStmt= Extent=[8:3 - 8:17]
// CHECK: blocks.c:8:11: VarDecl=i:8:11 (Definition) Extent=[8:11 - 8:16]
// CHECK: blocks.c:8:15: UnexposedExpr= Extent=[8:15 - 8:16]
// CHECK: blocks.c:9:3: CallExpr= Extent=[9:3 - 9:65]
diff --git a/test/Index/code-complete-errors.c b/test/Index/code-complete-errors.c
index 01c298c01d..4fe213eca6 100644
--- a/test/Index/code-complete-errors.c
+++ b/test/Index/code-complete-errors.c
@@ -10,7 +10,14 @@ 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 *')
}
+#define expand_to_binary_function(ret, name, parm1, parm2, code) ret name(parm1, parm2) code
+
+expand_to_binary_function(int, g, int *ip, float *fp, {
+// CHECK: code-complete-errors.c:17:15:{17:12-17:14}{17:18-17:20}: warning: comparison of distinct pointer types ('int *' and 'float *')
+ return ip == fp;
+ })
+
void g() { }
-// RUN: c-index-test -code-completion-at=%s:13:12 -pedantic %s 2> %t
+// RUN: c-index-test -code-completion-at=%s:19:12 -pedantic %s 2> %t
// RUN: FileCheck -check-prefix=CHECK %s < %t