diff options
author | Fariborz Jahanian <fjahanian@apple.com> | 2013-04-05 19:40:53 +0000 |
---|---|---|
committer | Fariborz Jahanian <fjahanian@apple.com> | 2013-04-05 19:40:53 +0000 |
commit | 5238e40f6ea6346b6bc1505e4975c2c4ab7fde09 (patch) | |
tree | 386bda523b0cbd3c323193c360ccb2266ca84a4f | |
parent | a3989b8f54421cd90a48ace8820c7147cea6bb3d (diff) |
doce parsing: adding few more headerdoc tags.
// rdar://12379114
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178903 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | include/clang/AST/CommentCommands.td | 5 | ||||
-rw-r--r-- | test/Index/comment-misc-tags.m | 34 | ||||
-rw-r--r-- | utils/TableGen/ClangCommentCommandInfoEmitter.cpp | 3 |
3 files changed, 42 insertions, 0 deletions
diff --git a/include/clang/AST/CommentCommands.td b/include/clang/AST/CommentCommands.td index 9587ace87c..e6ff2a4da2 100644 --- a/include/clang/AST/CommentCommands.td +++ b/include/clang/AST/CommentCommands.td @@ -140,9 +140,11 @@ def Todo : BlockCommand<"todo">; def Version : BlockCommand<"version">; def Warning : BlockCommand<"warning">; // HeaderDoc commands +def Abstract : BlockCommand<"abstract">; def ClassDesign : RecordLikeDetailCommand<"classdesign">; def CoClass : RecordLikeDetailCommand<"coclass">; def Dependency : RecordLikeDetailCommand<"dependency">; +def Discussion : BlockCommand<"discussion">; def Helper : RecordLikeDetailCommand<"helper">; def HelperClass : RecordLikeDetailCommand<"helperclass">; def Helps : RecordLikeDetailCommand<"helps">; @@ -173,6 +175,9 @@ def FDollar : VerbatimBlockCommand<"f$">; // Inline LaTeX formula defm FBracket : VerbatimBlockCommand<"f[", "f]">; // Displayed LaTeX formula defm FBrace : VerbatimBlockCommand<"f{", "f}">; // LaTeX environment +// HeaderDoc commands +defm Textblock : VerbatimBlockCommand<"textblock", "/textblock">; + //===----------------------------------------------------------------------===// // VerbatimLineCommand //===----------------------------------------------------------------------===// diff --git a/test/Index/comment-misc-tags.m b/test/Index/comment-misc-tags.m new file mode 100644 index 0000000000..608a88730c --- /dev/null +++ b/test/Index/comment-misc-tags.m @@ -0,0 +1,34 @@ +// RUN: rm -rf %t +// RUN: mkdir %t +// RUN: c-index-test -test-load-source all -comments-xml-schema=%S/../../bindings/xml/comment-xml-schema.rng %s > %t/out +// RUN: FileCheck %s < %t/out +// rdar://12379114 + +/*! + @interface IOCommandGate + @brief This is a brief + @abstract Single-threaded work-loop client request mechanism. + @discussion An IOCommandGate instance is an extremely light weight mechanism that + executes an action on the driver's work-loop... + @textblock + Many discussions about text + Many1 discussions about text + Many2 discussions about text + @/textblock + */ +@interface IOCommandGate +@end + +// CHECK: (CXComment_BlockCommand CommandName=[abstract] +// CHECK-NEXT: (CXComment_Paragraph +// CHECK-NEXT: (CXComment_Text Text=[ Single-threaded work-loop client request mechanism.] HasTrailingNewline) +// CHECK: (CXComment_BlockCommand CommandName=[discussion] +// CHECK-NEXT: (CXComment_Paragraph +// CHECK-NEXT: (CXComment_Text Text=[ An IOCommandGate instance is an extremely light weight mechanism that] HasTrailingNewline) +// CHECK-NEXT: (CXComment_Text Text=[ executes an action on the driver's work-loop...] HasTrailingNewline) +// CHECK: (CXComment_VerbatimBlockCommand CommandName=[textblock] +// CHECK-NEXT: (CXComment_VerbatimBlockLine Text=[ Many discussions about text]) +// CHECK-NEXT: (CXComment_VerbatimBlockLine Text=[ Many1 discussions about text]) +// CHECK-NEXT: (CXComment_VerbatimBlockLine Text=[ Many2 discussions about text])) +// CHECK-NEXT: (CXComment_Paragraph IsWhitespace + diff --git a/utils/TableGen/ClangCommentCommandInfoEmitter.cpp b/utils/TableGen/ClangCommentCommandInfoEmitter.cpp index ebb0427d7c..cab1c2b9b2 100644 --- a/utils/TableGen/ClangCommentCommandInfoEmitter.cpp +++ b/utils/TableGen/ClangCommentCommandInfoEmitter.cpp @@ -97,6 +97,9 @@ static std::string MangleName(StringRef Str) { case '$': Mangled += "dollar"; break; + case '/': + Mangled += "slash"; + break; } } return Mangled; |