1 // RUN: %clang_cc1 -Wdocumentation -ast-dump -ast-dump-filter Test %s | FileCheck -strict-whitespace %s 2 3 /// Aaa 4 int TestLocation; 5 // CHECK: VarDecl{{.*}}TestLocation 6 // CHECK-NEXT: FullComment 0x{{[^ ]*}} <line:[[@LINE-3]]:4, col:7> 7 8 /// 9 int TestIndent; 10 // CHECK: {{^VarDecl.*TestIndent[^()]*$}} 11 // CHECK-NEXT: {{^`-FullComment.*>$}} 12 13 /// Aaa 14 int Test_TextComment; 15 // CHECK: VarDecl{{.*}}Test_TextComment 16 // CHECK-NEXT: FullComment 17 // CHECK-NEXT: ParagraphComment 18 // CHECK-NEXT: TextComment{{.*}} Text=" Aaa" 19 20 /// \brief Aaa 21 int Test_BlockCommandComment; 22 // CHECK: VarDecl{{.*}}Test_BlockCommandComment 23 // CHECK: BlockCommandComment{{.*}} Name="brief" 24 // CHECK-NEXT: ParagraphComment 25 // CHECK-NEXT: TextComment{{.*}} Text=" Aaa" 26 27 /// \param Aaa xxx 28 /// \param [in,out] Bbb yyy 29 void Test_ParamCommandComment(int Aaa, int Bbb); 30 // CHECK: FunctionDecl{{.*}}Test_ParamCommandComment 31 // CHECK: ParamCommandComment{{.*}} [in] implicitly Param="Aaa" ParamIndex=0 32 // CHECK-NEXT: ParagraphComment 33 // CHECK-NEXT: TextComment{{.*}} Text=" xxx" 34 // CHECK: ParamCommandComment{{.*}} [in,out] explicitly Param="Bbb" ParamIndex=1 35 // CHECK-NEXT: ParagraphComment 36 // CHECK-NEXT: TextComment{{.*}} Text=" yyy" 37 38 /// \tparam Aaa xxx 39 template <typename Aaa> class Test_TParamCommandComment; 40 // CHECK: ClassTemplateDecl{{.*}}Test_TParamCommandComment 41 // CHECK: TParamCommandComment{{.*}} Param="Aaa" Position=<0> 42 // CHECK-NEXT: ParagraphComment 43 // CHECK-NEXT: TextComment{{.*}} Text=" xxx" 44 45 /// \c Aaa 46 int Test_InlineCommandComment; 47 // CHECK: VarDecl{{.*}}Test_InlineCommandComment 48 // CHECK: InlineCommandComment{{.*}} Name="c" RenderMonospaced Arg[0]="Aaa" 49 50 /// <a>Aaa</a> 51 /// <br/> 52 int Test_HTMLTagComment; 53 // CHECK: VarDecl{{.*}}Test_HTMLTagComment 54 // CHECK-NEXT: FullComment 55 // CHECK-NEXT: ParagraphComment 56 // CHECK-NEXT: TextComment{{.*}} Text=" " 57 // CHECK-NEXT: HTMLStartTagComment{{.*}} Name="a" 58 // CHECK-NEXT: TextComment{{.*}} Text="Aaa" 59 // CHECK-NEXT: HTMLEndTagComment{{.*}} Name="a" 60 // CHECK-NEXT: TextComment{{.*}} Text=" " 61 // CHECK-NEXT: HTMLStartTagComment{{.*}} Name="br" SelfClosing 62 63 /// \verbatim 64 /// Aaa 65 /// \endverbatim 66 int Test_VerbatimBlockComment; 67 // CHECK: VarDecl{{.*}}Test_VerbatimBlockComment 68 // CHECK: VerbatimBlockComment{{.*}} Name="verbatim" CloseName="endverbatim" 69 // CHECK-NEXT: VerbatimBlockLineComment{{.*}} Text=" Aaa" 70