summaryrefslogtreecommitdiff
path: root/test/Index/annotate-comments.cpp
Commit message (Collapse)AuthorAge
* [libclang] Remove comma from the blacklist of characters that prevent a ↵Argyrios Kyrtzidis2013-07-26
| | | | | | | | | comment to be attached to a decl. It's common to use an availability function macro at the start of a decl. rdar://13965065 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187230 91177308-0d34-0410-b5e6-96231b3b80d8
* Split annotate-comments.cpp into a fragile (that uses hardcoded line numbers)Dmitri Gribenko2012-11-15
| | | | | | | and a non-fragile (that uses [[@LINE]]) parts. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168098 91177308-0d34-0410-b5e6-96231b3b80d8
* clang/test/Index/annotate-comments.cpp: Relax the expression to be matched ↵NAKAMURA Takumi2012-10-19
| | | | | | | | to -fms-compatibility. Then XFAIL can be removed. FYI, it can be reproduced with "c-index-test -std=c++11 -fms-compatibility". git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166261 91177308-0d34-0410-b5e6-96231b3b80d8
* clang/test/Index/annotate-comments.cpp: Mark this as XFAIL on msvc. ↵NAKAMURA Takumi2012-10-19
| | | | | | Investigating. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166250 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix this test to match recent addition of declaration tag.Fariborz Jahanian2012-10-18
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166190 91177308-0d34-0410-b5e6-96231b3b80d8
* [Doc parsing]: This patch adds <Declaration> tag to Fariborz Jahanian2012-10-17
| | | | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166130 91177308-0d34-0410-b5e6-96231b3b80d8
* Comment AST: TableGen'ize all command lists in CommentCommandTraits.cpp.Dmitri Gribenko2012-09-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Merging consecutive comments: be more conservative.Dmitri Gribenko2012-08-28
| | | | | | | Should fix part 2 of PR13374. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162723 91177308-0d34-0410-b5e6-96231b3b80d8
* CommentBriefParser: allow paragraphs to be separated by line of whitespace.Dmitri Gribenko2012-08-21
| | | | | | | Skip paragraphs that contain only whitespace. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162315 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove absolute file path in test.Dmitri Gribenko2012-08-09
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161602 91177308-0d34-0410-b5e6-96231b3b80d8
* Comment to HTML and XML conversion: ignore commands that contain a declarationDmitri Gribenko2012-08-09
| | | | | | | as their argument. For example, \fn, \function, \typedef, \method, \class etc. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161601 91177308-0d34-0410-b5e6-96231b3b80d8
* Comment to HTML and XML conversion: use CommandTraits to classify commands.Dmitri Gribenko2012-08-09
| | | | | | | | This also fixes a bug in comment to XML conversion: \result was just an ordinary paragraph, not an alias for \returns. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161596 91177308-0d34-0410-b5e6-96231b3b80d8
* Comment XML: use xml:space="preserve" in Verbatim tags, so that XML tidy doesDmitri Gribenko2012-08-08
| | | | | | | not compress spaces in verbatim content. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161531 91177308-0d34-0410-b5e6-96231b3b80d8
* Comment AST: DeclInfo: add a special kind for enums.Dmitri Gribenko2012-08-07
| | | | | | | Comment XML: add a root node kind for enums. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161442 91177308-0d34-0410-b5e6-96231b3b80d8
* Comment AST: treat enumerators as "variables" in DeclInfo.Dmitri Gribenko2012-08-07
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161435 91177308-0d34-0410-b5e6-96231b3b80d8
* libclang API for comment-to-xml conversion.Dmitri Gribenko2012-08-07
| | | | | | | | | | | | | 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! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161431 91177308-0d34-0410-b5e6-96231b3b80d8
* Comment to HTML conversion: correct typo in CSS class name: taram -> tparamDmitri Gribenko2012-08-01
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161145 91177308-0d34-0410-b5e6-96231b3b80d8
* Comment to HTML conversion: skip \tparam commands with whitespace paragraphsDmitri Gribenko2012-08-01
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161096 91177308-0d34-0410-b5e6-96231b3b80d8
* Comment to HTML conversion: escape HTML special characters in command argumentsDmitri Gribenko2012-08-01
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161094 91177308-0d34-0410-b5e6-96231b3b80d8
* Comment parsing: add support for \tparam command on all levels.Dmitri Gribenko2012-07-31
| | | | | | | | | | | 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
* Implement resolving of HTML character references (named: &amp;, decimal: &#42;,Dmitri Gribenko2012-07-27
| | | | | | | | | | hex: &#x1a;) during comment parsing. Now internal representation of plain text in comment AST does not contain character references, but the characters themselves. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160891 91177308-0d34-0410-b5e6-96231b3b80d8
* libclang comment to HTML rendering: \result is the same as \returnsDmitri Gribenko2012-07-25
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160738 91177308-0d34-0410-b5e6-96231b3b80d8
* libclang comments AST: clang_ParamCommandComment_getParamName: don't assertDmitri Gribenko2012-07-23
| | | | | | | | when a \param command does not have a parameter name, just return an empty string instead. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160638 91177308-0d34-0410-b5e6-96231b3b80d8
* Comment AST: add InlineContentComment::RenderKind to specify a defaultDmitri Gribenko2012-07-23
| | | | | | | | | rendering mode for clients that don't want to interpret Doxygen commands. Also add a libclang API to query this information. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160633 91177308-0d34-0410-b5e6-96231b3b80d8
* Comment to HTML conversion: add more CSS classes to identify function argumentsDmitri Gribenko2012-07-21
| | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160595 91177308-0d34-0410-b5e6-96231b3b80d8
* Add libclang APIs to walk comments ASTs and an API to convert a comment to anDmitri Gribenko2012-07-20
| | | | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160577 91177308-0d34-0410-b5e6-96231b3b80d8
* CommentBriefParser: use \returns if we can't find the \brief or just a plainDmitri Gribenko2012-07-20
| | | | | | | paragraph. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160550 91177308-0d34-0410-b5e6-96231b3b80d8
* CommentBriefParser: make \short should equivalent to \brief, per Doxygen manual.Dmitri Gribenko2012-07-17
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160383 91177308-0d34-0410-b5e6-96231b3b80d8
* Restrict the set of declaration kinds for which we allow trailing comments.Dmitri Gribenko2012-07-06
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159878 91177308-0d34-0410-b5e6-96231b3b80d8
* Cleanup \brief comment. Since it is a single paragraph, no need to save ↵Dmitri Gribenko2012-06-28
| | | | | | 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-28
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159309 91177308-0d34-0410-b5e6-96231b3b80d8
* Attaching documentation comments to declarations: don't attach a comment to ↵Dmitri Gribenko2012-06-27
| | | | | | a declaration if there is a preprocessor directive between them. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159305 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement a lexer for structured comments.Dmitri Gribenko2012-06-26
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159223 91177308-0d34-0410-b5e6-96231b3b80d8
* Structured comment parsing, first step.Dmitri Gribenko2012-06-20
* Retain comments in the AST * Serialize/deserialize comments * Find comments attached to a certain Decl * Expose raw comment text and SourceRange via libclang git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158771 91177308-0d34-0410-b5e6-96231b3b80d8