]> granicus.if.org Git - clang/commitdiff
CommentBriefParser: make \short should equivalent to \brief, per Doxygen manual.
authorDmitri Gribenko <gribozavr@gmail.com>
Tue, 17 Jul 2012 18:35:14 +0000 (18:35 +0000)
committerDmitri Gribenko <gribozavr@gmail.com>
Tue, 17 Jul 2012 18:35:14 +0000 (18:35 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160383 91177308-0d34-0410-b5e6-96231b3b80d8

lib/AST/CommentBriefParser.cpp
test/Index/annotate-comments.cpp

index bc9244a6935ee63897d9386d83b28bc2f3f039e8..687ece219425b9fcaed6f3991c0acc3cf5b180e6 100644 (file)
@@ -43,6 +43,7 @@ void cleanupBrief(std::string &S) {
 bool isBlockCommand(StringRef Name) {
   return llvm::StringSwitch<bool>(Name)
       .Case("brief", true)
+      .Case("short", true)
       .Case("result", true)
       .Case("return", true)
       .Case("returns", true)
@@ -71,7 +72,7 @@ std::string BriefParser::Parse() {
 
     if (Tok.is(tok::command)) {
       StringRef Name = Tok.getCommandName();
-      if (Name == "brief") {
+      if (Name == "brief" || Name == "short") {
         Paragraph.clear();
         InBrief = true;
         ConsumeToken();
index 18dab246184a2366c6e4c5063dbe77273a506c74..406e743f878126d06d16339d09b10c89d6c050db 100644 (file)
@@ -194,14 +194,24 @@ void isdoxy44(void);
 /// Ggg. IS_DOXYGEN_END
 void isdoxy45(void);
 
+/// IS_DOXYGEN_START Aaa bbb
+/// ccc.
+///
+/// \short
+/// Ddd eee.
+/// Fff.
+///
+/// Ggg. IS_DOXYGEN_END
+void isdoxy46(void);
+
 /// IS_DOXYGEN_NOT_ATTACHED
 #define FOO
-void notdoxy46(void);
+void notdoxy47(void);
 
 /// IS_DOXYGEN_START Aaa bbb
 /// \param ccc
 /// \returns ddd IS_DOXYGEN_END
-void isdoxy47(int);
+void isdoxy48(int);
 
 #endif
 
@@ -267,5 +277,6 @@ void isdoxy47(int);
 
 // CHECK: annotate-comments.cpp:185:6: FunctionDecl=isdoxy44:{{.*}} BriefComment=[IS_DOXYGEN_START Aaa bbb ccc.]
 // CHECK: annotate-comments.cpp:195:6: FunctionDecl=isdoxy45:{{.*}} BriefComment=[Ddd eee. Fff.]
-// CHECK: annotate-comments.cpp:204:6: FunctionDecl=isdoxy47:{{.*}} BriefComment=[IS_DOXYGEN_START Aaa bbb]
+// CHECK: annotate-comments.cpp:205:6: FunctionDecl=isdoxy46:{{.*}} BriefComment=[Ddd eee. Fff.]
+// CHECK: annotate-comments.cpp:214:6: FunctionDecl=isdoxy48:{{.*}} BriefComment=[IS_DOXYGEN_START Aaa bbb]