1*f4a2713aSLionel Sambuc // Note: the run lines follow their respective tests, since line/column 2*f4a2713aSLionel Sambuc // matter in this test. 3*f4a2713aSLionel Sambuc 4*f4a2713aSLionel Sambuc /// Aaa. 5*f4a2713aSLionel Sambuc void T1(float x, float y); 6*f4a2713aSLionel Sambuc 7*f4a2713aSLionel Sambuc /// Bbb. 8*f4a2713aSLionel Sambuc class T2 { 9*f4a2713aSLionel Sambuc public: 10*f4a2713aSLionel Sambuc /// Ccc. 11*f4a2713aSLionel Sambuc void T3(); 12*f4a2713aSLionel Sambuc 13*f4a2713aSLionel Sambuc int T4; ///< Ddd. 14*f4a2713aSLionel Sambuc }; 15*f4a2713aSLionel Sambuc 16*f4a2713aSLionel Sambuc /// Eee. 17*f4a2713aSLionel Sambuc namespace T5 { 18*f4a2713aSLionel Sambuc } 19*f4a2713aSLionel Sambuc 20*f4a2713aSLionel Sambuc struct T6 { 21*f4a2713aSLionel Sambuc /// \brief Fff. 22*f4a2713aSLionel Sambuc void T7(); 23*f4a2713aSLionel Sambuc 24*f4a2713aSLionel Sambuc /// \brief Ggg. 25*f4a2713aSLionel Sambuc void T8(); 26*f4a2713aSLionel Sambuc }; 27*f4a2713aSLionel Sambuc T7()28*f4a2713aSLionel Sambucvoid T6::T7() { 29*f4a2713aSLionel Sambuc } 30*f4a2713aSLionel Sambuc test1()31*f4a2713aSLionel Sambucvoid test1() { 32*f4a2713aSLionel Sambuc 33*f4a2713aSLionel Sambuc T2 t2; 34*f4a2713aSLionel Sambuc t2.T4; 35*f4a2713aSLionel Sambuc 36*f4a2713aSLionel Sambuc T6 t6; 37*f4a2713aSLionel Sambuc t6.T8(); 38*f4a2713aSLionel Sambuc } 39*f4a2713aSLionel Sambuc 40*f4a2713aSLionel Sambuc // RUN: env CINDEXTEST_COMPLETION_BRIEF_COMMENTS=1 c-index-test -code-completion-at=%s:32:1 %s | FileCheck -check-prefix=CHECK-CC1 %s 41*f4a2713aSLionel Sambuc // CHECK-CC1: FunctionDecl:{ResultType void}{TypedText T1}{{.*}}(brief comment: Aaa.) 42*f4a2713aSLionel Sambuc // CHECK-CC1: ClassDecl:{TypedText T2}{{.*}}(brief comment: Bbb.) 43*f4a2713aSLionel Sambuc // CHECK-CC1: Namespace:{TypedText T5}{{.*}}(brief comment: Eee.) 44*f4a2713aSLionel Sambuc 45*f4a2713aSLionel Sambuc // RUN: env CINDEXTEST_COMPLETION_BRIEF_COMMENTS=1 c-index-test -code-completion-at=%s:34:6 %s | FileCheck -check-prefix=CHECK-CC2 %s 46*f4a2713aSLionel Sambuc // CHECK-CC2: CXXMethod:{ResultType void}{TypedText T3}{{.*}}(brief comment: Ccc.) 47*f4a2713aSLionel Sambuc // CHECK-CC2: FieldDecl:{ResultType int}{TypedText T4}{{.*}}(brief comment: Ddd.) 48*f4a2713aSLionel Sambuc 49*f4a2713aSLionel Sambuc // RUN: env CINDEXTEST_COMPLETION_BRIEF_COMMENTS=1 c-index-test -code-completion-at=%s:37:6 %s | FileCheck -check-prefix=CHECK-CC3 %s 50*f4a2713aSLionel Sambuc // CHECK-CC3: CXXMethod:{ResultType void}{TypedText T7}{LeftParen (}{RightParen )} (34)(brief comment: Fff.) 51*f4a2713aSLionel Sambuc // CHECK-CC3: CXXMethod:{ResultType void}{TypedText T8}{LeftParen (}{RightParen )} (34)(brief comment: Ggg.) 52