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