blob: b7570b631a0c337e78575896dfe6f1c162b862d5 [file] [log] [blame]
Argyrios Kyrtzidis25893e02012-10-31 17:29:22 +00001
2// This is to make sure we skip function bodies.
3void func_to_skip() {
4 undeclared1 = 0;
5}
6
7struct S { int x; };
8
9void func(S *s) {
10 undeclared2 = 0;
11 s->x = 0;
12}
13
NAKAMURA Takumi334111d2013-01-17 07:27:55 +000014// RUN: c-index-test -code-completion-at=%s:11:6 %s 2> %t.stderr | FileCheck %s --check-prefix=STDOUT
15// RUN: FileCheck --input-file=%t.stderr --check-prefix=STDERR %s
NAKAMURA Takumibef17f92012-11-01 00:20:00 +000016
NAKAMURA Takumi334111d2013-01-17 07:27:55 +000017// STDOUT: FieldDecl:{ResultType int}{TypedText x}
18
19// STDERR-NOT: error: use of undeclared identifier 'undeclared1'
20// STDERR: error: use of undeclared identifier 'undeclared2'