1 // RUN: c-index-test core -print-source-symbols -- -target x86_64-apple-darwin10 -fms-extensions -fno-ms-compatibility %s | FileCheck %s
2 
3 // CHECK: [[@LINE+1]]:8 | struct/C++ | Simple | [[Simple_USR:.*]] | <no-cgname> | Def | rel: 0
4 struct Simple {
5   int GetX() const;
6   // CHECK: [[@LINE-1]]:7 | instance-method/C++ | GetX | [[GetX_USR:.*]] | __ZNK6Simple4GetXEv | Decl,RelChild | rel: 1
7   // CHECK-NEXT: RelChild | Simple | [[Simple_USR]]
8 
9   void PutX(int i);
10   // CHECK: [[@LINE-1]]:8 | instance-method/C++ | PutX | [[PutX_USR:.*]] | __ZN6Simple4PutXEi | Decl,RelChild | rel: 1
11   // CHECK-NEXT: RelChild | Simple | [[Simple_USR]]
12 
13   __declspec(property(get=GetX, put=PutX)) int propX;
14   // CHECK: [[@LINE-1]]:48 | instance-property/C++ | propX | [[propX_USR:.*]] | <no-cgname> | Def,RelChild | rel: 1
15   // CHECK-NEXT: RelChild | Simple | [[Simple_USR]]
16 };
17 
18 // CHECK: [[@LINE+1]]:5 | function/C | test | [[test_USR:.*]] | __Z4testv | Def | rel: 0
test()19 int test() {
20   Simple s;
21   s.propX = 5;
22   // CHECK: [[@LINE-1]]:5 | instance-property/C++ | propX | [[propX_USR]] | <no-cgname> | Ref,RelCont | rel: 1
23   // CHECK-NEXT: RelCont | test | [[test_USR]]
24   // CHECK: [[@LINE-3]]:5 | instance-method/C++ | PutX | [[PutX_USR]] | __ZN6Simple4PutXEi | Ref,Call,RelCall,RelCont | rel: 1
25   // CHECK-NEXT: RelCall,RelCont | test | [[test_USR]]
26 
27   return s.propX;
28   // CHECK: [[@LINE-1]]:12 | instance-property/C++ | propX | [[propX_USR]] | <no-cgname> | Ref,RelCont | rel: 1
29   // CHECK-NEXT: RelCont | test | [[test_USR]]
30   // CHECK: [[@LINE-3]]:12 | instance-method/C++ | GetX | [[GetX_USR]] | __ZNK6Simple4GetXEv | Ref,Call,RelCall,RelCont | rel: 1
31   // CHECK-NEXT: RelCall,RelCont | test | [[test_USR]]
32 }
33