diff options
author | dim <dim@FreeBSD.org> | 2013-04-08 18:45:10 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2013-04-08 18:45:10 +0000 |
commit | c72c57c9e9b69944e3e009cd5e209634839581d3 (patch) | |
tree | 4fc2f184c499d106f29a386c452b49e5197bf63d /test/Misc/ast-dump-comment.cpp | |
parent | 5b20025c30d23d521e12c1f33ec8fa6b821952cd (diff) | |
download | FreeBSD-src-c72c57c9e9b69944e3e009cd5e209634839581d3.zip FreeBSD-src-c72c57c9e9b69944e3e009cd5e209634839581d3.tar.gz |
Vendor import of clang trunk r178860:
http://llvm.org/svn/llvm-project/cfe/trunk@178860
Diffstat (limited to 'test/Misc/ast-dump-comment.cpp')
-rw-r--r-- | test/Misc/ast-dump-comment.cpp | 69 |
1 files changed, 69 insertions, 0 deletions
diff --git a/test/Misc/ast-dump-comment.cpp b/test/Misc/ast-dump-comment.cpp new file mode 100644 index 0000000..4e84af0 --- /dev/null +++ b/test/Misc/ast-dump-comment.cpp @@ -0,0 +1,69 @@ +// RUN: %clang_cc1 -Wdocumentation -ast-dump -ast-dump-filter Test %s | FileCheck -strict-whitespace %s + +/// Aaa +int TestLocation; +// CHECK: VarDecl{{.*}}TestLocation +// CHECK-NEXT: FullComment 0x{{[^ ]*}} <line:[[@LINE-3]]:4, col:7> + +/// +int TestIndent; +// CHECK: {{^VarDecl.*TestIndent[^()]*$}} +// CHECK-NEXT: {{^`-FullComment.*>$}} + +/// Aaa +int Test_TextComment; +// CHECK: VarDecl{{.*}}Test_TextComment +// CHECK-NEXT: FullComment +// CHECK-NEXT: ParagraphComment +// CHECK-NEXT: TextComment{{.*}} Text=" Aaa" + +/// \brief Aaa +int Test_BlockCommandComment; +// CHECK: VarDecl{{.*}}Test_BlockCommandComment +// CHECK: BlockCommandComment{{.*}} Name="brief" +// CHECK-NEXT: ParagraphComment +// CHECK-NEXT: TextComment{{.*}} Text=" Aaa" + +/// \param Aaa xxx +/// \param [in,out] Bbb yyy +void Test_ParamCommandComment(int Aaa, int Bbb); +// CHECK: FunctionDecl{{.*}}Test_ParamCommandComment +// CHECK: ParamCommandComment{{.*}} [in] implicitly Param="Aaa" ParamIndex=0 +// CHECK-NEXT: ParagraphComment +// CHECK-NEXT: TextComment{{.*}} Text=" xxx" +// CHECK: ParamCommandComment{{.*}} [in,out] explicitly Param="Bbb" ParamIndex=1 +// CHECK-NEXT: ParagraphComment +// CHECK-NEXT: TextComment{{.*}} Text=" yyy" + +/// \tparam Aaa xxx +template <typename Aaa> class Test_TParamCommandComment; +// CHECK: ClassTemplateDecl{{.*}}Test_TParamCommandComment +// CHECK: TParamCommandComment{{.*}} Param="Aaa" Position=<0> +// CHECK-NEXT: ParagraphComment +// CHECK-NEXT: TextComment{{.*}} Text=" xxx" + +/// \c Aaa +int Test_InlineCommandComment; +// CHECK: VarDecl{{.*}}Test_InlineCommandComment +// CHECK: InlineCommandComment{{.*}} Name="c" RenderMonospaced Arg[0]="Aaa" + +/// <a>Aaa</a> +/// <br/> +int Test_HTMLTagComment; +// CHECK: VarDecl{{.*}}Test_HTMLTagComment +// CHECK-NEXT: FullComment +// CHECK-NEXT: ParagraphComment +// CHECK-NEXT: TextComment{{.*}} Text=" " +// CHECK-NEXT: HTMLStartTagComment{{.*}} Name="a" +// CHECK-NEXT: TextComment{{.*}} Text="Aaa" +// CHECK-NEXT: HTMLEndTagComment{{.*}} Name="a" +// CHECK-NEXT: TextComment{{.*}} Text=" " +// CHECK-NEXT: HTMLStartTagComment{{.*}} Name="br" SelfClosing + +/// \verbatim +/// Aaa +/// \endverbatim +int Test_VerbatimBlockComment; +// CHECK: VarDecl{{.*}}Test_VerbatimBlockComment +// CHECK: VerbatimBlockComment{{.*}} Name="verbatim" CloseName="endverbatim" +// CHECK-NEXT: VerbatimBlockLineComment{{.*}} Text=" Aaa" |