r178903 - doce parsing: adding few more headerdoc tags.

Fariborz Jahanian fjahanian at apple.com
Fri Apr 5 12:40:53 PDT 2013


Author: fjahanian
Date: Fri Apr  5 14:40:53 2013
New Revision: 178903

URL: http://llvm.org/viewvc/llvm-project?rev=178903&view=rev
Log:
doce parsing: adding few more headerdoc tags.
// rdar://12379114

Added:
    cfe/trunk/test/Index/comment-misc-tags.m
Modified:
    cfe/trunk/include/clang/AST/CommentCommands.td
    cfe/trunk/utils/TableGen/ClangCommentCommandInfoEmitter.cpp

Modified: cfe/trunk/include/clang/AST/CommentCommands.td
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/CommentCommands.td?rev=178903&r1=178902&r2=178903&view=diff
==============================================================================
--- cfe/trunk/include/clang/AST/CommentCommands.td (original)
+++ cfe/trunk/include/clang/AST/CommentCommands.td Fri Apr  5 14:40:53 2013
@@ -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$
 defm FBracket : VerbatimBlockCommand<"f[", "f]">; // Displayed LaTeX formula
 defm FBrace   : VerbatimBlockCommand<"f{", "f}">; // LaTeX environment
 
+// HeaderDoc commands
+defm Textblock    : VerbatimBlockCommand<"textblock", "/textblock">;
+
 //===----------------------------------------------------------------------===//
 // VerbatimLineCommand
 //===----------------------------------------------------------------------===//

Added: cfe/trunk/test/Index/comment-misc-tags.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Index/comment-misc-tags.m?rev=178903&view=auto
==============================================================================
--- cfe/trunk/test/Index/comment-misc-tags.m (added)
+++ cfe/trunk/test/Index/comment-misc-tags.m Fri Apr  5 14:40:53 2013
@@ -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
+ */
+ at interface IOCommandGate
+ at 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
+

Modified: cfe/trunk/utils/TableGen/ClangCommentCommandInfoEmitter.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/utils/TableGen/ClangCommentCommandInfoEmitter.cpp?rev=178903&r1=178902&r2=178903&view=diff
==============================================================================
--- cfe/trunk/utils/TableGen/ClangCommentCommandInfoEmitter.cpp (original)
+++ cfe/trunk/utils/TableGen/ClangCommentCommandInfoEmitter.cpp Fri Apr  5 14:40:53 2013
@@ -97,6 +97,9 @@ static std::string MangleName(StringRef
     case '$':
       Mangled += "dollar";
       break;
+    case '/':
+      Mangled += "slash";
+      break;
     }
   }
   return Mangled;





More information about the cfe-commits mailing list