aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/AST/CommentBriefParser.cpp
AgeCommit message (Collapse)AuthorFilesLines
2016-07-18[NFC] Header cleanupMehdi Amini1-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
2013-03-02Some refactoring in my patch on documentFariborz Jahanian1-1/+1
command source fidelity. // rdar://13066276 llvm-svn: 176401
2012-09-10Comment AST: TableGen'ize all command lists in CommentCommandTraits.cpp.Dmitri Gribenko1-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
2012-08-21CommentBriefParser: allow paragraphs to be separated by line of whitespace.Dmitri Gribenko1-5/+38
Skip paragraphs that contain only whitespace. llvm-svn: 162315
2012-08-09Comment parsing: extract TableGen'able pieces into new CommandTraits class.Dmitri Gribenko1-19/+9
llvm-svn: 161548
2012-07-31Comment parsing: add support for \tparam command on all levels.Dmitri Gribenko1-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
2012-07-20CommentBriefParser: coding style fixDmitri Gribenko1-2/+1
llvm-svn: 160551
2012-07-20CommentBriefParser: use \returns if we can't find the \brief or just a plainDmitri Gribenko1-6/+21
paragraph. llvm-svn: 160550
2012-07-17CommentBriefParser: use StringSwitch::Cases to group synonyms. Thanks Jordan!Dmitri Gribenko1-9/+4
llvm-svn: 160396
2012-07-17CommentBriefParser: make \short should equivalent to \brief, per Doxygen manual.Dmitri Gribenko1-1/+2
llvm-svn: 160383
2012-07-03CommentBriefParser: remove dead store. Found by Clang Analyzer.Dmitri Gribenko1-6/+2
llvm-svn: 159673
2012-06-29Factor out a check for block commands (that implicitly start a new ↵Dmitri Gribenko1-3/+18
paragraph) into a separate function. llvm-svn: 159444
2012-06-28Cleanup \brief comment. Since it is a single paragraph, no need to save ↵Dmitri Gribenko1-1/+30
newlines there. llvm-svn: 159325
2012-06-28Teach \brief parser about commands that start a new paragraph implicitlyDmitri Gribenko1-7/+19
llvm-svn: 159309
2012-06-27Simplify logic in BriefParser::Parse(), per Jordan's comment.Dmitri Gribenko1-14/+7
llvm-svn: 159247
2012-06-26Implement a lexer for structured comments.Dmitri Gribenko1-0/+76
llvm-svn: 159223