summaryrefslogtreecommitdiffstats
path: root/clang/test/Index/comment-to-html-xml-conversion.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Make output of -ast-print a valid C++ code.Serge Pavlov2016-11-101-3/+3
| | | | | | | | | | | | | | | | | | Output generated by option -ast-print looks like C/C++ code, and it really is for plain C. For C++ the produced output was not valid C++ code, but the differences were small. With this change the output is fixed and can be compiled. Tests are changed so that output produced by -ast-print is compiled again with the same flags and both outputs are compared. Option -ast-print is extensively used in clang tests but it itself was tested poorly, existing tests only checked that compiler did not crash. There are unit tests in file DeclPrinterTest.cpp, but they test only terse output mode. Differential Revision: https://reviews.llvm.org/D26452 llvm-svn: 286439
* [libclang] Visit TypeAliasTemplateDeclSergey Kalinichev2015-11-151-1/+1
| | | | | | | | This makes TypeAliasTemplateDecl accessible via LibClang and python bindings Differential Revision: http://reviews.llvm.org/D13844 llvm-svn: 253166
* [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] Use same USR encoding for 'class' as 'struct'.Argyrios Kyrtzidis2014-12-081-20/+20
| | | | | | | | 'class' and 'struct' can be used interchangebly for forward references. Use the same encoding otherwise we may get into a weird situation where the USR for the same declaration is different based on whether the definition of the tag reference is visible or not. llvm-svn: 223632
* [libclang] Function templates can be 'overloaded' by return type, so encode ↵Argyrios Kyrtzidis2014-12-081-6/+6
| | | | | | | | the return type in the USR and handle DependentNameType in order to be able to distinguish them. llvm-svn: 223628
* Comment parsing: remove HTML attribute validationDmitri Gribenko2014-04-301-9/+9
| | | | | | | | | | | | Since the community says that a blacklist is not good enough, and I don't have enough time now to implement a proper whitelist, let's just remove the attribute validation. But, nevertheless, we can still communicate in the generated XML if our parser found an issue with the HTML. But this bit is best-effort and is specifically called out in the schema as such. llvm-svn: 207712
* Comment parsing: close a hole in CDATA escaping in XML outputDmitri Gribenko2014-04-221-0/+12
| | | | llvm-svn: 206886
* Comment parsing: in the generated XML file, mark HTML that is safe to passDmitri Gribenko2014-04-221-2/+30
| | | | | | | | | | | through to the output even if the input comment comes from an untrusted source Attribute filtering is currently based on a blacklist, which right now includes all event handler attributes (they contain JavaScipt code). It should be switched to a whitelist, but going over all of the HTML5 spec requires a significant amount of time. llvm-svn: 206882
* Comment parsing: attach comments to enums declared using the NS_ENUM macroDmitri Gribenko2014-03-271-12/+0
| | | | | | Previously we would only attach comments to the typedef. llvm-svn: 204942
* Pretty Printer: Print constexpr and ref qualifiers. Don't print return types ↵Benjamin Kramer2014-02-251-1/+1
| | | | | | on destructors. llvm-svn: 202181
* Reapply "Pretty Printer: Fix printing of conversion operator decls and calls."Benjamin Kramer2014-02-251-1/+1
| | | | | | There were many additional tests that had the bad behavior baked in. llvm-svn: 202174
* Correct hyphenations in comments and assert messagesAlp Toker2013-12-051-3/+3
| | | | | | | This patch tries to avoid unrelated changes other than fixing a few hyphen-related ambiguities in nearby lines. llvm-svn: 196466
* Comment parsing tests: introduce a little more structure in testcaseDmitri Gribenko2013-11-201-34/+58
| | | | llvm-svn: 195187
* Revert r195176, it is breaking buildbots for unclear reasonDmitri Gribenko2013-11-201-58/+34
| | | | llvm-svn: 195184
* Comment parsing tests: introduce a little more structure in testcaseDmitri Gribenko2013-11-201-34/+58
| | | | llvm-svn: 195176
* Remove full path from CHECK lineDmitri Gribenko2013-11-191-1/+2
| | | | llvm-svn: 195147
* Documentation parsing: in HeaderDoc, \abstract is equivalent to \briefDmitri Gribenko2013-11-191-13/+28
| | | | llvm-svn: 195145
* Documentation parsing: add support for \throws \throw \exception commandsDmitri Gribenko2013-11-121-0/+86
| | | | llvm-svn: 194521
* Comment parsing: recognize \def (but processing is a no-op, like the rest ofDmitri Gribenko2013-11-091-8/+36
| | | | | | similar commands that duplicate the declaration name) llvm-svn: 194312
* Comment parsing tests: move tests where they belongDmitri Gribenko2013-08-191-0/+51
| | | | | | | | | | | Move C++-specific tests that were checking if we attach a base class comment to a derived class to an existing test comment-to-html-xml-conversion.cpp. Note that the original testing approach was not actually testing the class--comment relationship. It only checked that we attached the comment *somewhere*. The rest of subclass-comment.mm should be also moved elsewhere. llvm-svn: 188658
* Documentation parsing: if typedef name is being declaredFariborz Jahanian2013-07-241-0/+11
| | | | | | | | via a macro, try using declaration's starting location. This is improvement over not having a valid location and dropping comment altogether. // rdar://14348912 llvm-svn: 187085
* Comment parsing: allow "\param ..." to describe variadic argumentsDmitri Gribenko2013-06-241-36/+53
| | | | | | | | Original patch by Fariborz Jahanian; extended by me. Fixes rdar://14124644 llvm-svn: 184688
* Comment parsing: followup to r184610: allow multiple \returnsDmitri Gribenko2013-06-221-6/+6
| | | | | | | | | Remove unneeded member in CommentSema, add a test for the XML schema (the schema already allowed multiple paragraphs in <ResultDiscussion>, but there were no tests for that), fix HTML generation (it is not allowed to have <p> inside <dl>). llvm-svn: 184652
* [document parsing]: Allow multiple adjacent \return and the likeFariborz Jahanian2013-06-211-6/+7
| | | | | | | commands. Render them properly in XML output. // rdar://14207725 llvm-svn: 184610
* Fix test error caused by r183008.Daniel Jasper2013-05-311-2/+2
| | | | llvm-svn: 183010
* Fix test breakage caused by change in clang-format.Daniel Jasper2013-05-151-2/+2
| | | | llvm-svn: 181888
* Mark comment-to-html-xml-conversion test as XFAIL:msan, in addition to valgrind.Evgeniy Stepanov2013-03-271-0/+1
| | | | llvm-svn: 178138
* Comment parsing: improve the fidelity of XML output for many block commandsDmitri Gribenko2013-02-011-0/+26
| | | | | | | | | | | | | | 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
* Comment parsing: fold named character references test into other HTML testsDmitri Gribenko2013-01-301-0/+35
| | | | llvm-svn: 173934
* clang/test/Index/comment-to-html-xml-conversion.cpp: Mark this as ↵NAKAMURA Takumi2013-01-221-0/+2
| | | | | | XFAIL:valgrind, for now. Working in progress. llvm-svn: 173121
* Fixes formatting of empty blocks.Manuel Klimek2013-01-211-2/+2
| | | | | | | | | | | | | | | | We now only put empty blocks into a single line, if all of: - all tokens of the structural element fit into a single line - we're not in a control flow statement Note that we usually don't put record definitions into a single line, as there's usually at least one more token (the semicolon) after the closing brace. This doesn't hold when we are in a context where there is no semicolon, like "enum E {}". There were some missing tests around joining lines around the corner cases of the allowed number of columns, so this patch adds some. llvm-svn: 173055
* Fix parsing of templated declarations.Daniel Jasper2013-01-211-1/+1
| | | | | | | | | | Before: template <template <typename T>, typename P > class X; After: template <template <typename T>, typename P> class X; More importantly, the token annotations for the second ">" are now computed correctly. llvm-svn: 173047
* Actually update the test, fixup for r172923Dmitri Gribenko2013-01-191-1/+1
| | | | llvm-svn: 172925
* Comment parsing: add more tests for html character referencesDmitri Gribenko2013-01-191-3/+15
| | | | llvm-svn: 172923
* Do not add newline in empty blocks.Manuel Klimek2013-01-101-7/+7
| | | | | | | void f() {} now gets formatted in one line. llvm-svn: 172067
* Comment to XML conversion: no, we don't want to print instantiations for theDmitri Gribenko2013-01-071-2/+2
| | | | | | <Declaration> tag llvm-svn: 171763
* Fix parsing of variable declarations directly after a class / struct.Manuel Klimek2013-01-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | Previous indent: class A { } a; void f() { }; With this patch: class A { } a; void f() { } ; The patch introduces a production for classes and structs, and parses the rest of the line to the semicolon after the class scope. This allowed us to remove a long-standing wart in the parser that would just much the semicolon after any block. Due to this suboptimal formating some tests were broken. Some unrelated formatting tests broke; those hit a bug in the ast printing, and need to be fixed separately. llvm-svn: 171761
* Various fixes to clang-format's macro handling.Manuel Klimek2013-01-041-5/+5
| | | | | | | | | | | | | | | | | | | Some of this is still pretty rough (note the load of FIXMEs), but it is strictly an improvement and fixes various bugs that were related to macro processing but are also imporant in non-macro use cases. Specific fixes: - correctly puts espaced newlines at the end of the line - fixes counting of white space before a token when escaped newlines are present - fixes parsing of "trailing" tokens when eof() is hit - puts macro parsing orthogonal to parsing other structure - general support for parsing of macro definitions Due to the fix to format trailing tokens, this change also includes a bunch of fixes to the c-index tests. llvm-svn: 171556
* Prefer splitting after "template <...>" and fix indentation.Daniel Jasper2013-01-021-1/+1
| | | | | | | | | | | | | | | | | | | This addresses llvm.org/PR14699 Before: template <typename T> void looooooooooooooooooooooongFunction(int Param1, int Param2); template <typename T> void looooooooooooooooooooongFunction( int Paaaaaaaaaaaaaaaaaaaaram1, int Paaaaaaaaaaaaaaaaaaaaram2); After: template <typename T> void looooooooooooooooooooooongFunction(int Param1, int Param2); template <typename T> void looooooooooooooooooooongFunction(int Paaaaaaaaaaaaaaaaaaaaram1, int Paaaaaaaaaaaaaaaaaaaaram2); llvm-svn: 171388
* Temporary fix of tests to make buildbots happy.Daniel Jasper2012-12-211-1/+1
| | | | | | Permanent solution coming up after checking back with Fariborz/Douglas. llvm-svn: 170887
* Add objective-C style formatting to clang format andFariborz Jahanian2012-12-201-1/+1
| | | | | | | use it to format xml declaration tags. // rdar://12378714 llvm-svn: 170727
* Testing C++ declarations embedded inFariborz Jahanian2012-12-051-1/+1
| | | | | | | | | <declaration> tag of Comment XML. Added DeclPrint support for constructors and fix tests accordingly. This is wip. // rdar://12378714 llvm-svn: 169412
* Comment to XML conversion test: correct filename.Dmitri Gribenko2012-11-151-58/+58
| | | | llvm-svn: 168101
* Split annotate-comments.cpp into a fragile (that uses hardcoded line numbers)Dmitri Gribenko2012-11-151-0/+721
and a non-fragile (that uses [[@LINE]]) parts. llvm-svn: 168098
OpenPOWER on IntegriCloud