[docs] Add LICENSE.txt to the root of the mono-repo
[llvm-project.git] / clang / test / Index / complete-documentation.cpp
blob553660a124f8e0fec3e0020bdda03eb0e22923ef
1 // Note: the run lines follow their respective tests, since line/column
2 // matter in this test.
4 /// Aaa.
5 void T1(float x, float y);
7 /// Bbb.
8 class T2 {
9 public:
10 /// Ccc.
11 void T3();
13 int T4; ///< Ddd.
16 /// Eee.
17 namespace T5 {
20 struct T6 {
21 /// \brief Fff.
22 void T7();
24 /// \brief Ggg.
25 void T8();
28 void T6::T7() {
31 void test1() {
33 T2 t2;
34 t2.T4;
36 T6 t6;
37 t6.T8();
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.)
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.)
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.)