summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST/CommentBriefParser.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Remove \brief commands from doxygen comments.Adrian Prantl2018-05-091-2/+2
| | | | | | | | | | | | | | | | | | | This is similar to the LLVM change https://reviews.llvm.org/D46290. We've been running doxygen with the autobrief option for a couple of years now. This makes the \brief markers into our comments redundant. Since they are a visual distraction and we don't want to encourage more \brief markers in new code either, this patch removes them all. Patch produced by for i in $(git grep -l '\@brief'); do perl -pi -e 's/\@brief //g' $i & done for i in $(git grep -l '\\brief'); do perl -pi -e 's/\\brief //g' $i & done Differential Revision: https://reviews.llvm.org/D46320 llvm-svn: 331834
* [NFC] Header cleanupMehdi Amini2016-07-181-1/+0
| | | | | | | | | | Summary: Removed unused headers, replaced some headers with forward class declarations Patch by: Eugene <claprix@yandex.ru> Differential Revision: https://reviews.llvm.org/D20100 llvm-svn: 275882
* Some refactoring in my patch on documentFariborz Jahanian2013-03-021-1/+1
| | | | | | command source fidelity. // rdar://13066276 llvm-svn: 176401
* Comment AST: TableGen'ize all command lists in CommentCommandTraits.cpp.Dmitri Gribenko2012-09-101-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now we have a list of all commands. This is a good thing in itself, but it also enables us to easily implement typo correction for command names. With this change we have objects that contain information about each command, so it makes sense to resolve command name just once during lexing (currently we store command names as strings and do a linear search every time some property value is needed). Thus comment token and AST nodes were changed to contain a command ID -- index into a tables of builtin and registered commands. Unknown commands are registered during parsing and thus are also uniformly assigned an ID. Using an ID instead of a StringRef is also a nice memory optimization since ID is a small integer that fits into a common bitfield in Comment class. This change implies that to get any information about a command (even a command name) we need a CommandTraits object to resolve the command ID to CommandInfo*. Currently a fresh temporary CommandTraits object is created whenever it is needed since it does not have any state. But with this change it has state -- new commands can be registered, so a CommandTraits object was added to ASTContext. Also, in libclang CXComment has to be expanded to include a CXTranslationUnit so that all functions working on comment AST nodes can get a CommandTraits object. This breaks binary compatibility of CXComment APIs. Now clang_FullComment_getAsXML(CXTranslationUnit TU, CXComment CXC) doesn't need TU parameter anymore, so it was removed. This is a source-incompatible change for this C API. llvm-svn: 163540
* CommentBriefParser: allow paragraphs to be separated by line of whitespace.Dmitri Gribenko2012-08-211-5/+38
| | | | | | Skip paragraphs that contain only whitespace. llvm-svn: 162315
* Comment parsing: extract TableGen'able pieces into new CommandTraits class.Dmitri Gribenko2012-08-091-19/+9
| | | | llvm-svn: 161548
* Comment parsing: add support for \tparam command on all levels.Dmitri Gribenko2012-07-311-0/+1
| | | | | | | | | | The only caveat is renumbering CXCommentKind enum for aesthetic reasons -- this breaks libclang binary compatibility, but should not be a problem since API is so new. This also fixes PR13372 as a side-effect. llvm-svn: 161087
* CommentBriefParser: coding style fixDmitri Gribenko2012-07-201-2/+1
| | | | llvm-svn: 160551
* CommentBriefParser: use \returns if we can't find the \brief or just a plainDmitri Gribenko2012-07-201-6/+21
| | | | | | paragraph. llvm-svn: 160550
* CommentBriefParser: use StringSwitch::Cases to group synonyms. Thanks Jordan!Dmitri Gribenko2012-07-171-9/+4
| | | | llvm-svn: 160396
* CommentBriefParser: make \short should equivalent to \brief, per Doxygen manual.Dmitri Gribenko2012-07-171-1/+2
| | | | llvm-svn: 160383
* CommentBriefParser: remove dead store. Found by Clang Analyzer.Dmitri Gribenko2012-07-031-6/+2
| | | | llvm-svn: 159673
* Factor out a check for block commands (that implicitly start a new ↵Dmitri Gribenko2012-06-291-3/+18
| | | | | | paragraph) into a separate function. llvm-svn: 159444
* Cleanup \brief comment. Since it is a single paragraph, no need to save ↵Dmitri Gribenko2012-06-281-1/+30
| | | | | | newlines there. llvm-svn: 159325
* Teach \brief parser about commands that start a new paragraph implicitlyDmitri Gribenko2012-06-281-7/+19
| | | | llvm-svn: 159309
* Simplify logic in BriefParser::Parse(), per Jordan's comment.Dmitri Gribenko2012-06-271-14/+7
| | | | llvm-svn: 159247
* Implement a lexer for structured comments.Dmitri Gribenko2012-06-261-0/+76
llvm-svn: 159223
OpenPOWER on IntegriCloud