summaryrefslogtreecommitdiffstats
path: root/test/Index/complete-declarators.cpp
blob: 61d776589237a96c830fc14d2d2deb821b7a57fd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
// This test is line- and column-sensitive, so test commands are at the bottom.
namespace N {
  struct X {
    int f(X);
  };
}

int g(int a);

struct Y { };

struct Z {
  int member;
  friend int N::X::f(N::X);
};

// RUN: c-index-test -code-completion-at=%s:8:5 %s | FileCheck -check-prefix=CHECK-CC1 %s
// CHECK-CC1: NotImplemented:{TypedText const} (30)
// CHECK-CC1: NotImplemented:{TypedText N}{Text ::} (75)
// CHECK-CC1: NotImplemented:{TypedText operator} (30)
// CHECK-CC1: NotImplemented:{TypedText volatile} (30)
// RUN: c-index-test -code-completion-at=%s:8:11 %s | FileCheck -check-prefix=CHECK-CC2 %s
// CHECK-CC2: NotImplemented:{TypedText const} (30)
// CHECK-CC2-NOT: NotImplemented:{TypedText N}{Text ::} (75)
// CHECK-CC2-NOT: NotImplemented:{TypedText operator} (30)
// CHECK-CC2: NotImplemented:{TypedText volatile} (30)
// RUN: c-index-test -code-completion-at=%s:13:7 %s | FileCheck -check-prefix=CHECK-CC3 %s
// CHECK-CC3: NotImplemented:{TypedText const} (30)
// CHECK-CC3-NOT: NotImplemented:{TypedText N}{Text ::} (75)
// CHECK-CC3: NotImplemented:{TypedText operator} (30)
// CHECK-CC3: NotImplemented:{TypedText volatile} (30)
// RUN: c-index-test -code-completion-at=%s:14:14 %s | FileCheck -check-prefix=CHECK-CC4 %s
// CHECK-CC4: NotImplemented:{TypedText const} (30)
// CHECK-CC4: NotImplemented:{TypedText N}{Text ::} (75)
// CHECK-CC4: NotImplemented:{TypedText operator} (30)
// CHECK-CC4: NotImplemented:{TypedText volatile} (30)
// CHECK-CC4: StructDecl:{TypedText Y} (65)
// CHECK-CC4: StructDecl:{TypedText Z} (20)