summaryrefslogtreecommitdiff
path: root/lib/AST/CommentBriefParser.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Update the file headers across all of the LLVM projects in the monorepoChandler Carruth2019-01-191-4/+3
| | | | | | | | | | | | | | | | | to reflect the new license. We understand that people may be surprised that we're moving the header entirely to discuss the new license. We checked this carefully with the Foundation's lawyer and we believe this is the correct approach. Essentially, all code in the project is now made available by the LLVM project under our new license, so you will see that the license headers include that license only. Some of our contributors have contributed code under our old license, and accordingly, we have retained a copy of our old license notice in the top-level files in each project and repository. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@351636 91177308-0d34-0410-b5e6-96231b3b80d8
* 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 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@331834 91177308-0d34-0410-b5e6-96231b3b80d8
* [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 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@275882 91177308-0d34-0410-b5e6-96231b3b80d8
* Some refactoring in my patch on documentFariborz Jahanian2013-03-021-1/+1
| | | | | | | | command source fidelity. // rdar://13066276 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176401 91177308-0d34-0410-b5e6-96231b3b80d8
* 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163540 91177308-0d34-0410-b5e6-96231b3b80d8
* CommentBriefParser: allow paragraphs to be separated by line of whitespace.Dmitri Gribenko2012-08-211-5/+38
| | | | | | | Skip paragraphs that contain only whitespace. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162315 91177308-0d34-0410-b5e6-96231b3b80d8
* Comment parsing: extract TableGen'able pieces into new CommandTraits class.Dmitri Gribenko2012-08-091-19/+9
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161548 91177308-0d34-0410-b5e6-96231b3b80d8
* 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161087 91177308-0d34-0410-b5e6-96231b3b80d8
* CommentBriefParser: coding style fixDmitri Gribenko2012-07-201-2/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160551 91177308-0d34-0410-b5e6-96231b3b80d8
* CommentBriefParser: use \returns if we can't find the \brief or just a plainDmitri Gribenko2012-07-201-6/+21
| | | | | | | paragraph. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160550 91177308-0d34-0410-b5e6-96231b3b80d8
* CommentBriefParser: use StringSwitch::Cases to group synonyms. Thanks Jordan!Dmitri Gribenko2012-07-171-9/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160396 91177308-0d34-0410-b5e6-96231b3b80d8
* CommentBriefParser: make \short should equivalent to \brief, per Doxygen manual.Dmitri Gribenko2012-07-171-1/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160383 91177308-0d34-0410-b5e6-96231b3b80d8
* CommentBriefParser: remove dead store. Found by Clang Analyzer.Dmitri Gribenko2012-07-031-6/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159673 91177308-0d34-0410-b5e6-96231b3b80d8
* Factor out a check for block commands (that implicitly start a new ↵Dmitri Gribenko2012-06-291-3/+18
| | | | | | paragraph) into a separate function. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159444 91177308-0d34-0410-b5e6-96231b3b80d8
* Cleanup \brief comment. Since it is a single paragraph, no need to save ↵Dmitri Gribenko2012-06-281-1/+30
| | | | | | newlines there. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159325 91177308-0d34-0410-b5e6-96231b3b80d8
* Teach \brief parser about commands that start a new paragraph implicitlyDmitri Gribenko2012-06-281-7/+19
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159309 91177308-0d34-0410-b5e6-96231b3b80d8
* Simplify logic in BriefParser::Parse(), per Jordan's comment.Dmitri Gribenko2012-06-271-14/+7
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159247 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement a lexer for structured comments.Dmitri Gribenko2012-06-261-0/+76
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159223 91177308-0d34-0410-b5e6-96231b3b80d8