summaryrefslogtreecommitdiffstats
path: root/clang/tools/libclang/CXComment.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Comment to XML conversion: replace string comparison with command ID comparisonDmitri Gribenko2013-02-031-3/+8
| | | | llvm-svn: 174290
* libclang: remove 'using namespace cxstring'Dmitri Gribenko2013-02-031-1/+0
| | | | llvm-svn: 174285
* libclang: introduce cxstring::{createRef,createDup} for StringRefsDmitri Gribenko2013-02-021-15/+15
| | | | | | Also migrate all clients from the old API. llvm-svn: 174263
* Comment parsing: improve the fidelity of XML output for many block commandsDmitri Gribenko2013-02-011-3/+42
| | | | | | | | | | | | | | This change introduces a 'kind' attribute for the <Para> tag, that captures the kind of the parent block command. For example: \todo Meow. used to be just <Para>Meow.</Para>, but now it is <Para kind="todo">Meow.</Para> llvm-svn: 174216
* libclang: introduce cxstring::createNull()Dmitri Gribenko2013-02-011-15/+15
| | | | llvm-svn: 174173
* [Comment parsing] Add support for recognizingFariborz Jahanian2013-01-311-2/+15
| | | | | | | | \headerfile command and representing it in an xml document. Patch reviewed by Dmitri Gribenko. // rdar://12397511 llvm-svn: 174109
* libclang: type safety for CXTranslationUnitImpl::FormatContextDmitri Gribenko2013-01-261-10/+7
| | | | llvm-svn: 173589
* libclang: factor out the frequent pattern static_cast<ASTUnit *>(TU->TUData)Dmitri Gribenko2013-01-261-1/+1
| | | | | | into a getter cxtu::getASTUnit(TU) llvm-svn: 173585
* Remove useless 'llvm::' qualifier from names like StringRef and others that areDmitri Gribenko2013-01-121-1/+1
| | | | | | brought into 'clang' namespace by clang/Basic/LLVM.h llvm-svn: 172323
* Comment to XML conversion: no, we don't want to print instantiations for theDmitri Gribenko2013-01-071-1/+1
| | | | | | <Declaration> tag llvm-svn: 171763
* Re-sort #include lines using the llvm/utils/sort_includes.py script.Chandler Carruth2013-01-021-2/+2
| | | | | | | Removes a duplicate #include as well as cleaning up some sort order regressions since I last ran the script over Clang. llvm-svn: 171364
* Add objective-C style formatting to clang format andFariborz Jahanian2012-12-201-6/+0
| | | | | | | use it to format xml declaration tags. // rdar://12378714 llvm-svn: 170727
* Audit DeclPrinter with -ast-dump on Cocoa.h andFariborz Jahanian2012-12-191-1/+1
| | | | | | | | | fix any bad objectiveC syntax coming out of DeclPrinter. This is on going. Also, introduce a new PrintPolicy and use it as needed when declaration tag is to be produced via DeclPrinter. llvm-svn: 170606
* Increas number of iterations before a new libclang format objectFariborz Jahanian2012-12-191-1/+1
| | | | | | is created to 1000. llvm-svn: 170481
* Some code refactoring per Dimitri's comment.Fariborz Jahanian2012-12-191-39/+38
| | | | llvm-svn: 170478
* This is the libclang patch providing minimal API toFariborz Jahanian2012-12-181-4/+70
| | | | | | | | | | use clang's formatter. Currently, formatter is used to format declaration tags for xml comments. Since formatter is in flux and its change will break several of the clang comment tests, only a single tests is formatted using this facility. Doug has reviewed and approved it for check-in. llvm-svn: 170467
* Sort #include lines for tools/...Chandler Carruth2012-12-041-6/+3
| | | | | | Completely automated with sort_includes.py llvm-svn: 169240
* Comment to XML conversion: avoid memory allocation while pretty-printing theDmitri Gribenko2012-10-251-18/+22
| | | | | | declaration. llvm-svn: 166707
* Remove const_casts by propagating constness down to called functions.Dmitri Gribenko2012-10-191-9/+7
| | | | llvm-svn: 166287
* [doc parsing] use getParamName to access parameter Fariborz Jahanian2012-10-181-10/+15
| | | | | | | for current(rewritten) comment and getParamNameAsWritten to access param name coming with \param marker. llvm-svn: 166231
* libclang/CXComment.cpp: Fix abuse of StringRef.NAKAMURA Takumi2012-10-181-1/+1
| | | | llvm-svn: 166163
* [Doc parsing]: This patch adds <Declaration> tag to Fariborz Jahanian2012-10-171-1/+20
| | | | | | | | | | | XML comment for declarations which pretty-prints declaration. I had to XFAIL one test annotate-comments.cpp. This test is currently unmaintainable as written. Dmitri G., can you see what we can do about this test. We should change this test such that adding a new tag does not wreck havoc to the test. llvm-svn: 166130
* Fixes location of overriding declaration with no commentFariborz Jahanian2012-10-151-1/+1
| | | | | | of their own. llvm-svn: 165972
* structured document comment: patch to provide comment for overriding functionFariborz Jahanian2012-10-151-3/+3
| | | | | | | template when comment is comming from overridden declaration. // rdar://12378793 llvm-svn: 165953
* search for overridden methods with comment when overriding methodFariborz Jahanian2012-10-111-2/+2
| | | | | | | has none of its own. Factor in Doug's comments. // rdar://12378793 llvm-svn: 165771
* [Doc parsing] This patch searches overridden objc/c++Fariborz Jahanian2012-10-101-15/+22
| | | | | | | | | | methods looking for documentation on a particular base class inherited by any method that overrides the base class. In case of redeclaration, as when objc method is defined in the implementation, it also looks up for documentation in class/class extension being redeclared. llvm-svn: 165643
* Comment to XML conversion: escape XML special chars correctly; use correctDmitri Gribenko2012-10-031-11/+9
| | | | | | regex for version tuples. llvm-svn: 165104
* [Doc parse]: SUpport for message in deprecated/unavailableFariborz Jahanian2012-10-021-5/+19
| | | | | | attribute going iinto XML document. llvm-svn: 165066
* [Doc parsing]: Add available and deprecated attribute infoFariborz Jahanian2012-10-021-1/+6
| | | | | | to XML output. // rdar://12378879 llvm-svn: 165039
* availability in structured documents. TakesFariborz Jahanian2012-10-011-33/+27
| | | | | | care of comments by Dimitri and Doug. llvm-svn: 164957
* [Doc parsing] Add availability information to generated Comment XML.Fariborz Jahanian2012-09-281-1/+56
| | | | | | | (I still need to add a test once I figure it out). Reviewed off-line by Doug. // rdar://12378879 llvm-svn: 164861
* Comment AST: TableGen'ize all command lists in CommentCommandTraits.cpp.Dmitri Gribenko2012-09-101-33/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Comment to HTML and XML conversion: ignore commands that contain a declarationDmitri Gribenko2012-08-091-1/+7
| | | | | | as their argument. For example, \fn, \function, \typedef, \method, \class etc. llvm-svn: 161601
* Comment to HTML and XML conversion: use CommandTraits to classify commands.Dmitri Gribenko2012-08-091-5/+9
| | | | | | | This also fixes a bug in comment to XML conversion: \result was just an ordinary paragraph, not an alias for \returns. llvm-svn: 161596
* Comment XML: use xml:space="preserve" in Verbatim tags, so that XML tidy doesDmitri Gribenko2012-08-081-3/+3
| | | | | | not compress spaces in verbatim content. llvm-svn: 161531
* Comment AST: DeclInfo: add a special kind for enums.Dmitri Gribenko2012-08-071-0/+4
| | | | | | Comment XML: add a root node kind for enums. llvm-svn: 161442
* libclang API for comment-to-xml conversion.Dmitri Gribenko2012-08-071-0/+388
| | | | | | | | | | | | The implementation also includes a Relax NG schema and tests for the schema itself. The schema is used in c-index-test to verify that XML documents we produce are valid. In order to do the validation, we add an optional libxml2 dependency for c-index-test. Credits for CMake part go to Doug Gregor. Credits for Autoconf part go to Eric Christopher. Thanks! llvm-svn: 161431
* Comment to HTML conversion: correct typo in CSS class name: taram -> tparamDmitri Gribenko2012-08-011-2/+2
| | | | llvm-svn: 161145
* Comment to HTML conversion: refactor. Extracted a class to for FullCommentDmitri Gribenko2012-08-011-122/+137
| | | | | | semantic parts -- this will be reused for comment to XML conversion. llvm-svn: 161139
* Comment to HTML conversion: skip \tparam commands with whitespace paragraphsDmitri Gribenko2012-08-011-0/+3
| | | | llvm-svn: 161096
* Comment to HTML conversion: escape HTML special characters in command argumentsDmitri Gribenko2012-08-011-7/+17
| | | | llvm-svn: 161094
* Comment parsing: add support for \tparam command on all levels.Dmitri Gribenko2012-07-311-0/+112
| | | | | | | | | | 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
* Move comment from member operator() to class.Dmitri Gribenko2012-07-301-2/+2
| | | | llvm-svn: 160980
* Add missing include for Linux buildbotDmitri Gribenko2012-07-301-0/+2
| | | | llvm-svn: 160971
* Add an assert to ParamCommandComment::getParamIndex() -- it should not beDmitri Gribenko2012-07-301-4/+11
| | | | | | called unless index is valid. llvm-svn: 160970
* libclang comment to HTML rendering: \result is the same as \returnsDmitri Gribenko2012-07-251-1/+2
| | | | llvm-svn: 160738
* libclang comments AST: clang_ParamCommandComment_getParamName: don't assertDmitri Gribenko2012-07-231-1/+1
| | | | | | | when a \param command does not have a parameter name, just return an empty string instead. llvm-svn: 160638
* Comment AST: add InlineContentComment::RenderKind to specify a defaultDmitri Gribenko2012-07-231-21/+43
| | | | | | | | rendering mode for clients that don't want to interpret Doxygen commands. Also add a libclang API to query this information. llvm-svn: 160633
* Comment to HTML conversion: add more CSS classes to identify function argumentsDmitri Gribenko2012-07-211-67/+66
| | | | | | | by index. This is useful if the user does not document all arguments, and we can't find a particular argument by index via :nth-of-type() CSS selector. llvm-svn: 160595
* Add libclang APIs to walk comments ASTs and an API to convert a comment to anDmitri Gribenko2012-07-201-0/+657
HTML fragment. For testing, c-index-test now has even more output: * HTML rendering of a comment * comment AST tree dump in S-expressions like Comment::dump(), but implemented * with libclang APIs. llvm-svn: 160577
OpenPOWER on IntegriCloud