comparison clang/test/Index/code-completion-skip-bodies.cpp @ 150:1d019706d866

LLVM10
author anatofuz
date Thu, 13 Feb 2020 15:10:13 +0900
parents
children
comparison
equal deleted inserted replaced
147:c2174574ed3a 150:1d019706d866
1
2 // This is to make sure we skip function bodies.
3 void func_to_skip() {
4 undeclared1 = 0;
5 }
6
7 struct S { int x; };
8
9 void func(S *s) {
10 undeclared2 = 0;
11 s->x = 0;
12 }
13
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
16
17 // STDOUT: FieldDecl:{ResultType int}{TypedText x}
18
19 // STDERR-NOT: error: use of undeclared identifier 'undeclared1'
20 // STDERR: error: use of undeclared identifier 'undeclared2'