[docs] Add LICENSE.txt to the root of the mono-repo
[llvm-project.git] / clang / test / Index / code-completion-skip-bodies.cpp
blobb7570b631a0c337e78575896dfe6f1c162b862d5
2 // This is to make sure we skip function bodies.
3 void func_to_skip() {
4 undeclared1 = 0;
7 struct S { int x; };
9 void func(S *s) {
10 undeclared2 = 0;
11 s->x = 0;
14 // 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
17 // STDOUT: FieldDecl:{ResultType int}{TypedText x}
19 // STDERR-NOT: error: use of undeclared identifier 'undeclared1'
20 // STDERR: error: use of undeclared identifier 'undeclared2'