diff options
author | Dmitri Gribenko <gribozavr@gmail.com> | 2012-07-17 18:35:14 +0000 |
---|---|---|
committer | Dmitri Gribenko <gribozavr@gmail.com> | 2012-07-17 18:35:14 +0000 |
commit | 3e242d6d3c1a317eb4616c4b21b196c051f773e3 (patch) | |
tree | 6ad857f892c924be688c07b6b60b3c69a2dbe5f1 | |
parent | 268fec1e2ea4833deeecaa594bd9ae726dcd545f (diff) | |
download | bcm5719-llvm-3e242d6d3c1a317eb4616c4b21b196c051f773e3.tar.gz bcm5719-llvm-3e242d6d3c1a317eb4616c4b21b196c051f773e3.zip |
CommentBriefParser: make \short should equivalent to \brief, per Doxygen manual.
llvm-svn: 160383
-rw-r--r-- | clang/lib/AST/CommentBriefParser.cpp | 3 | ||||
-rw-r--r-- | clang/test/Index/annotate-comments.cpp | 17 |
2 files changed, 16 insertions, 4 deletions
diff --git a/clang/lib/AST/CommentBriefParser.cpp b/clang/lib/AST/CommentBriefParser.cpp index bc9244a6935..687ece21942 100644 --- a/clang/lib/AST/CommentBriefParser.cpp +++ b/clang/lib/AST/CommentBriefParser.cpp @@ -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(); diff --git a/clang/test/Index/annotate-comments.cpp b/clang/test/Index/annotate-comments.cpp index 18dab246184..406e743f878 100644 --- a/clang/test/Index/annotate-comments.cpp +++ b/clang/test/Index/annotate-comments.cpp @@ -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] |