1 class MyCls { 2 void in_foo() { 3 vec.x = 0; 4 } 5 void out_foo(); 6 7 struct Vec { int x, y; }; 8 Vec vec; 9 }; 10 11 void MyCls::out_foo() { 12 vec.x = 0; 13 } 14 15 // RUN: c-index-test -code-completion-at=%s:3:9 %s | FileCheck %s 16 // RUN: c-index-test -code-completion-at=%s:12:7 %s | FileCheck %s 17 // CHECK: CXXMethod:{ResultType MyCls::Vec &}{TypedText operator=}{LeftParen (}{Placeholder const MyCls::Vec &}{RightParen )} (34) 18 // CHECK-NEXT: StructDecl:{TypedText Vec}{Text ::} (75) 19 // CHECK-NEXT: FieldDecl:{ResultType int}{TypedText x} (35) 20 // CHECK-NEXT: FieldDecl:{ResultType int}{TypedText y} (35) 21 // CHECK-NEXT: CXXDestructor:{ResultType void}{TypedText ~Vec}{LeftParen (}{RightParen )} (34) 22 // CHECK-NEXT: Completion contexts: 23 // CHECK-NEXT: Dot member access 24 // CHECK-NEXT: Container Kind: StructDecl 25