summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/clang-doc/YAMLGenerator.cpp
Commit message (Collapse)AuthorAgeFilesLines
* [clang-doc] Use llvm::createStringError and canonicalize error messagesFangrui Song2019-08-281-2/+2
| | | | | | | | | | | | | "Bad block found.\n" -> "bad block found" The lower cased form with no full stop or newline is more common in LLVM tools. Reviewed By: juliehockett Differential Revision: https://reviews.llvm.org/D66783 llvm-svn: 370155
* [clang-doc] Serialize inherited attributes and methodsDiego Astiazaran2019-08-161-10/+26
| | | | | | | | | | | clang-doc now serializes the inherited attributes and methods, not only the name of the base class. All inherited are tracked, if B:A and C:B, info of A is included in C. This data is stored in attribute Bases in a RecordInfo. Previously tracked inheritance data, stored in Parents and VParents, hasn't been removed to reduce review load. Differential revision: https://reviews.llvm.org/D66238 llvm-svn: 369075
* [clang-doc] Fix bitcode writer for access specifiersDiego Astiazaran2019-08-151-0/+6
| | | | | | | | | | | | | | | Bitcode writer was not emitting the corresponding record for the Access attribute of a FunctionInfo. This has been added. AS_none was being used as the default value for any AcesssSpecifier attribute (in FunctionInfo and MemberTypeInfo), this has been changed to AS_public because this is the enum value that evaluates to 0. The bitcode writer doesn't write values that are 0 so if an attribute was set to AS_public, this value is not written and after reading the bitcode it would have the default value which is AS_none. This is why the default value is now AS_public. Differential Revision: https://reviews.llvm.org/D66151 llvm-svn: 369063
* [clang-doc] Add index in each info html fileDiego Astiazaran2019-08-061-1/+0
| | | | | | | | | | | | An index structure is created while generating the output file for each info. This structure is parsed to JSON and written to a file in the output directory. The html for the index is not rendered by clang-doc. A Javascript file is included in the output directory, this will the JSON file and insert HTML elements into the file. Differential Revision: https://reviews.llvm.org/D65690 llvm-svn: 368070
* [clang-doc] Fix link generationDiego Astiazaran2019-08-061-0/+1
| | | | | | | | | | | | | | | | | | | Before making a link to a reference it is required to check that the reference has a path (eg. primitives won't have paths). This was done by checking if the path was empty; that worked because when generating paths the outdirectory was included, so if the path was assigned it had that outdirectory at least. The path generation was changed, it's now only the composite of the namespaces without the outdirectory. So if the info is in the global namespace the path would be empty and the old check wouldn't work as expected. A new attribute has been added to the Reference struct that indicates if the info's parent is the global namespace. Paths generation now fails if the path is empty and if the info is not in the global namespace. Differential Revision: https://reviews.llvm.org/D64958 llvm-svn: 367958
* [clang-doc] Add option for user provided stylesheetsDiego Astiazaran2019-07-251-2/+4
| | | | | | | | | | An option has been added to clang-doc to provide a list of css stylesheets that the user wants to use for the generated html docs. Depends on D64539. Differential Revision: https://reviews.llvm.org/D64938 llvm-svn: 367072
* [clang-doc] Add stylesheet to generated html docsDiego Astiazaran2019-07-251-0/+1
| | | | | | | | A default css stylesheet is included for docs generated in html format. Differential Revision: https://reviews.llvm.org/D64539 llvm-svn: 367056
* [clang-doc] Add html links to referencesJulie Hockett2019-07-121-0/+2
| | | | | | | | | | | | | | | | <a> tags are added for the parents and members of records and return type and params of functions. The link redirects to the reference's info file. The directory path where each info file will be saved is now generated in the serialization phase and stored as an attribute in each Info. Bitcode writer and reader were modified to handle the new attributes. Committed on behalf of Diego Astiazarán (diegoaat97@gmail.com). Differential Revision: https://reviews.llvm.org/D63663 llvm-svn: 365937
* Fix file headers. NFCFangrui Song2019-03-011-1/+1
| | | | llvm-svn: 355188
* Update the file headers across all of the LLVM projects in the monorepoChandler Carruth2019-01-191-4/+3
| | | | | | | | | | | | | | | | | to reflect the new license. We understand that people may be surprised that we're moving the header entirely to discuss the new license. We checked this carefully with the Foundation's lawyer and we believe this is the correct approach. Essentially, all code in the project is now made available by the LLVM project under our new license, so you will see that the license headers include that license only. Some of our contributors have contributed code under our old license, and accordingly, we have retained a copy of our old license notice in the top-level files in each project and repository. llvm-svn: 351636
* Reland "Implement a (simple) Markdown generator"Julie Hockett2018-09-111-5/+5
| | | | | | | | Relanding with fixes to tests for the failing bots. Differential Revision: https://reviews.llvm.org/D43424 llvm-svn: 341955
* Revert "Implement a (simple) Markdown generator"Julie Hockett2018-08-161-5/+5
| | | | | | | This reverts commit r339948, as it's breaking a few bots in ways that I can't reproduce right now. llvm-svn: 339966
* Implement a (simple) Markdown generatorJulie Hockett2018-08-161-5/+5
| | | | | | | | | | | | | | | Implementing a simple Markdown generator from the emitted bitcode summary of declarations. Very primitive at this point, but will be expanded. Currently emits an .md file for each class and namespace, listing its contents. For a more detailed overview of the tool, see the design document on the mailing list: http://lists.llvm.org/pipermail/cfe-dev/2017-December/056203.html Differential Revision: https://reviews.llvm.org/D43424 llvm-svn: 339948
* Reland "[clang-doc] Refactoring mapper to map by scope"Julie Hockett2018-08-021-1/+13
| | | | | | | | | | | | | | | Relanding with a minor change to prevent an assertion on release bots. The result of this adjusted mapper pass is that all Function and Enum infos are absorbed into the info of their enclosing scope (i.e. the class or namespace in which they are defined). Namespace and Record infos are passed along to the final output, but the second pass creates a reference to each in its parent scope. As a result, the top-level final outputs are Namespaces and Records. Differential Revision: https://reviews.llvm.org/D48341 llvm-svn: 338763
* Revert "[clang-doc] Refactoring mapper to map by scope"Julie Hockett2018-08-021-13/+1
| | | | | | This reverts commit r338738 as it's breaking the bots. llvm-svn: 338748
* [clang-doc] Refactoring mapper to map by scopeJulie Hockett2018-08-021-1/+13
| | | | | | | | | | | The result of this adjusted mapper pass is that all Function and Enum infos are absorbed into the info of their enclosing scope (i.e. the class or namespace in which they are defined). Namespace and Record infos are passed along to the final output, but the second pass creates a reference to each in its parent scope. As a result, the top-level final outputs are Namespaces and Records. llvm-svn: 338738
* [clang-doc] Implement a YAML generatorJulie Hockett2018-06-061-0/+268
Implmenting a YAML generator from the emitted bitcode summary of declarations. Emits one YAML file for each declaration information. For a more detailed overview of the tool, see the design document on the mailing list: http://lists.llvm.org/pipermail/cfe-dev/2017-December/056203.html llvm-svn: 334103
OpenPOWER on IntegriCloud