summaryrefslogtreecommitdiffstats
path: root/clang/test/Index/annotate-comments.cpp
Commit message (Collapse)AuthorAgeFilesLines
* [test/Index] Update libclang tests to use libclang for creating PCH files.Argyrios Kyrtzidis2015-08-051-0/+1
| | | | | | | This is consistent and tests the primary configuration we want to test, libclang creating and consuming PCH files. llvm-svn: 244066
* [libclang] Remove comma from the blacklist of characters that prevent a ↵Argyrios Kyrtzidis2013-07-261-1/+9
| | | | | | | | | comment to be attached to a decl. It's common to use an availability function macro at the start of a decl. rdar://13965065 llvm-svn: 187230
* Split annotate-comments.cpp into a fragile (that uses hardcoded line numbers)Dmitri Gribenko2012-11-151-640/+7
| | | | | | and a non-fragile (that uses [[@LINE]]) parts. llvm-svn: 168098
* clang/test/Index/annotate-comments.cpp: Relax the expression to be matched ↵NAKAMURA Takumi2012-10-191-4/+1
| | | | | | | | to -fms-compatibility. Then XFAIL can be removed. FYI, it can be reproduced with "c-index-test -std=c++11 -fms-compatibility". llvm-svn: 166261
* clang/test/Index/annotate-comments.cpp: Mark this as XFAIL on msvc. ↵NAKAMURA Takumi2012-10-191-0/+3
| | | | | | Investigating. llvm-svn: 166250
* Fix this test to match recent addition of declaration tag.Fariborz Jahanian2012-10-181-58/+57
| | | | llvm-svn: 166190
* [Doc parsing]: This patch adds <Declaration> tag to Fariborz Jahanian2012-10-171-0/+1
| | | | | | | | | | | 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
* Comment AST: TableGen'ize all command lists in CommentCommandTraits.cpp.Dmitri Gribenko2012-09-101-38/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Merging consecutive comments: be more conservative.Dmitri Gribenko2012-08-281-8/+8
| | | | | | Should fix part 2 of PR13374. llvm-svn: 162723
* CommentBriefParser: allow paragraphs to be separated by line of whitespace.Dmitri Gribenko2012-08-211-56/+84
| | | | | | Skip paragraphs that contain only whitespace. llvm-svn: 162315
* Remove absolute file path in test.Dmitri Gribenko2012-08-091-1/+1
| | | | llvm-svn: 161602
* Comment to HTML and XML conversion: ignore commands that contain a declarationDmitri Gribenko2012-08-091-38/+62
| | | | | | 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-1/+1
| | | | | | | 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-1/+1
| | | | | | not compress spaces in verbatim content. llvm-svn: 161531
* Comment AST: DeclInfo: add a special kind for enums.Dmitri Gribenko2012-08-071-1/+11
| | | | | | Comment XML: add a root node kind for enums. llvm-svn: 161442
* Comment AST: treat enumerators as "variables" in DeclInfo.Dmitri Gribenko2012-08-071-1/+6
| | | | llvm-svn: 161435
* libclang API for comment-to-xml conversion.Dmitri Gribenko2012-08-071-34/+128
| | | | | | | | | | | | 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-3/+3
| | | | llvm-svn: 161145
* Comment to HTML conversion: skip \tparam commands with whitespace paragraphsDmitri Gribenko2012-08-011-26/+42
| | | | llvm-svn: 161096
* Comment to HTML conversion: escape HTML special characters in command argumentsDmitri Gribenko2012-08-011-6/+26
| | | | llvm-svn: 161094
* Comment parsing: add support for \tparam command on all levels.Dmitri Gribenko2012-07-311-18/+105
| | | | | | | | | | 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
* Implement resolving of HTML character references (named: &amp;, decimal: &#42;,Dmitri Gribenko2012-07-271-5/+25
| | | | | | | | | hex: &#x1a;) during comment parsing. Now internal representation of plain text in comment AST does not contain character references, but the characters themselves. llvm-svn: 160891
* libclang comment to HTML rendering: \result is the same as \returnsDmitri Gribenko2012-07-251-30/+45
| | | | llvm-svn: 160738
* libclang comments AST: clang_ParamCommandComment_getParamName: don't assertDmitri Gribenko2012-07-231-24/+34
| | | | | | | 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-6/+6
| | | | | | | | 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-6/+6
| | | | | | | 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/+333
| | | | | | | | | | | 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
* CommentBriefParser: use \returns if we can't find the \brief or just a plainDmitri Gribenko2012-07-201-0/+10
| | | | | | paragraph. llvm-svn: 160550
* CommentBriefParser: make \short should equivalent to \brief, per Doxygen manual.Dmitri Gribenko2012-07-171-3/+14
| | | | llvm-svn: 160383
* Restrict the set of declaration kinds for which we allow trailing comments.Dmitri Gribenko2012-07-061-6/+3
| | | | llvm-svn: 159878
* Cleanup \brief comment. Since it is a single paragraph, no need to save ↵Dmitri Gribenko2012-06-281-3/+3
| | | | | | newlines there. llvm-svn: 159325
* Teach \brief parser about commands that start a new paragraph implicitlyDmitri Gribenko2012-06-281-0/+6
| | | | llvm-svn: 159309
* Attaching documentation comments to declarations: don't attach a comment to ↵Dmitri Gribenko2012-06-271-0/+4
| | | | | | a declaration if there is a preprocessor directive between them. llvm-svn: 159305
* Implement a lexer for structured comments.Dmitri Gribenko2012-06-261-2/+37
| | | | llvm-svn: 159223
* Structured comment parsing, first step.Dmitri Gribenko2012-06-201-0/+229
* Retain comments in the AST * Serialize/deserialize comments * Find comments attached to a certain Decl * Expose raw comment text and SourceRange via libclang llvm-svn: 158771
OpenPOWER on IntegriCloud