blob: 0b3c0bc423c6d80051077d4a1dae9390c8d776a3 [file] [log] [blame]
Argyrios Kyrtzidise422e452011-12-13 18:47:41 +00001
2namespace NS {
3 extern int gx;
4 typedef int MyInt;
5}
6
7enum {
8 EnumVal = 1
9};
10
11NS::MyInt NS::gx = EnumVal;
12
13void foo() {
14 NS::MyInt x;
15}
16
17enum {
18 SecondVal = EnumVal
19};
20
21// RUN: c-index-test -index-file %s | FileCheck %s
22// CHECK: [indexDeclaration]: kind: namespace | name: NS
23// CHECK-NEXT: [indexDeclaration]: kind: variable | name: gx
24// CHECK-NEXT: [indexDeclaration]: kind: typedef | name: MyInt
25// CHECK-NEXT: [indexDeclaration]: kind: enum
26// CHECK-NEXT: [indexDeclaration]: kind: enumerator | name: EnumVal
27// CHECK-NEXT: [indexDeclaration]: kind: variable | name: gx
28// CHECK-NEXT: [indexEntityReference]: kind: namespace | name: NS
29// CHECK-NEXT: [indexEntityReference]: kind: typedef | name: MyInt
30// CHECK-NEXT: [indexEntityReference]: kind: namespace | name: NS
31// CHECK-NEXT: [indexEntityReference]: kind: enumerator | name: EnumVal
32// CHECK-NEXT: [indexDeclaration]: kind: function | name: foo
33// CHECK-NEXT: [indexEntityReference]: kind: namespace | name: NS
34// CHECK-NEXT: [indexEntityReference]: kind: typedef | name: MyInt
35// CHECK-NEXT: [indexDeclaration]: kind: enum
36// CHECK-NEXT: [indexDeclaration]: kind: enumerator | name: SecondVal
37// CHECK-NEXT: [indexEntityReference]: kind: enumerator | name: EnumVal