summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/clang-doc/tool
Commit message (Collapse)AuthorAgeFilesLines
* NFC: Fix trivial typos in commentsKazuaki Ishizaki2020-01-041-1/+1
|
* Revert "Use InitLLVM to setup a pretty stack printer"Nico Weber2019-11-251-2/+1
| | | | | | | This reverts commit 3f76260dc0674cc0acb25f550a0f0c594cf537ea. Breaks at least these tests on Windows: Clang :: Driver/clang-offload-bundler.c Clang :: Driver/clang-offload-wrapper.c
* Use InitLLVM to setup a pretty stack printerRui Ueyama2019-11-261-1/+2
| | | | | | | | | | | | | | InitLLVM does not only save a few lines from main() but also makes the commands do the right thing for multibyte character pathnames on Windows (i.e. canonicalize argv's to UTF-8) because of the code we have in this file: https://github.com/llvm/llvm-project/blob/master/llvm/lib/Support/InitLLVM.cpp#L32 For many LLVM commands, we already have calls of InitLLVM, but there are still remainings. Differential Revision: https://reviews.llvm.org/D70702
* [clang-tools-extra] [cmake] Link against libclang-cpp whenever possibleMichal Gorny2019-10-041-2/+5
| | | | | | | | | Use clang_target_link_libraries() in order to support linking against libclang-cpp instead of static libraries. Differential Revision: https://reviews.llvm.org/D68448 llvm-svn: 373786
* [clang-doc] sys::fs::F_None -> OF_None. NFCFangrui Song2019-09-091-1/+1
| | | | | | F_None, F_Text and F_Append are kept for compatibility. llvm-svn: 371394
* [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] Switch Generator::CreateResources to use llvm::ErrorJulie Hockett2019-08-261-1/+4
| | | | | | Differential Revision: https://reviews.llvm.org/D66502 llvm-svn: 369925
* [clang-doc] Redesign of generated HTML filesDiego Astiazaran2019-08-161-0/+5
| | | | | | | | | | | | | The new design includes a header (contains the project name), a main section, and a footer. The main section is divided into three subsections. Left, middle, right. The left section contains the general index, the middle contains the info's data, and the right contains the index for the info's content. The CSS has been updated. A flag --project-name is added. The Attributes attribute of the TagNode struct is now a vector of pairs because these attributes should be rendered in the insertion order. The functions (cpp and js) that converts an Index tree structure into HTML were slightly modified; the first ul tag created is now a ol tag. The inner lists are still ul. Differential Revision: https://reviews.llvm.org/D66353 llvm-svn: 369139
* [clang-doc] Fix use of source-root flagDiego Astiazaran2019-08-151-7/+1
| | | | | | | | | | The value, if any, of --source-root flag was not being used. This has been fixed and the logic was moved to the ClangDocContext contructor. Differential revision: https://reviews.llvm.org/D66268 llvm-svn: 369065
* [clang-format] Add link to source code in file definitionsDiego Astiazaran2019-08-091-1/+21
| | | | | | | | | | | | | Two command line options have been added to clang-doc. --repository=<string> - URL of repository that hosts code; used for links to definition locations. --source-root=<string> - Directory where processed files are stored. Links to definition locations will only be generated if the file is in this dir. If the file is in the source-root and a repository options is passed; a link to the source code will be rendered by the HTML generator. Differential Revision: https://reviews.llvm.org/D65483 llvm-svn: 368460
* [clang-doc] Protect Index with mutex during reducing and generation stageDiego Astiazaran2019-08-081-0/+4
| | | | | | | | | | Idx in ClangDocContext instance was being modified by multiple threads causing a seg fault. A mutex is added to avoid this. Differential Revision: https://reviews.llvm.org/D65915 llvm-svn: 368313
* [clang-doc] Parallelize reducing phaseDiego Astiazaran2019-08-071-52/+63
| | | | | | | | | | | Reduce phase has been parallelized and a execution time was reduced by 60% with this. The reading of bitcode (bitcode -> Info) was moved to this segment of code parallelized so it now happens just before reducing. Differential Revision: https://reviews.llvm.org/D65628 llvm-svn: 368206
* [clang-doc] Add index in each info html fileDiego Astiazaran2019-08-062-5/+21
| | | | | | | | | | | | 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
* Rename F_{None,Text,Append} to OF_{None,Text,Append}. NFCFangrui Song2019-08-051-1/+2
| | | | | | F_{None,Text,Append} are kept for compatibility since r334221. llvm-svn: 367800
* [clang-doc] Add flag to continue after mapping errorsDiego Astiazaran2019-08-021-2/+13
| | | | | | | | | | The tool used to stop execution if there was an error in the mapping phase. It will now show the error but continue with the files that were mapped correctly if the flag is true. Differential revision: https://reviews.llvm.org/D65627 llvm-svn: 367729
* [clang-doc] Add option for user provided stylesheetsDiego Astiazaran2019-07-251-5/+24
| | | | | | | | | | 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-252-3/+19
| | | | | | | | 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-16/+14
| | | | | | | | | | | | | | | | <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
* [clang-doc] Add a structured HTML generatorJulie Hockett2019-07-101-1/+6
| | | | | | | | | | | | | | | Implements an HTML generator. Nodes are used to represent each part of the HTML file. There are TagNodes that represent every HTML tag (p, h1, div, ...) and they have children nodes, which can be TagNodes or TextNodes (these nodes only have text). Proper indentation is rendered within the files generated by tool. No styling (CSS) is included. Committed on behalf of Diego Astiazarán (diegoaat97@gmail.com) Differential Revision: https://reviews.llvm.org/D63857 llvm-svn: 365687
* [clang-doc] Handle anonymous namespacesJulie Hockett2019-06-281-5/+2
| | | | | | | | Improves output for anonymous decls, and updates the '--public' flag to exclude everything under an anonymous namespace. Differential Revision: https://reviews.llvm.org/D52847 llvm-svn: 364674
* [clang-doc] Build as clang_toolJulie Hockett2019-03-291-1/+1
| | | | | | | | Instead of as clang_executable. Differential Revision: https://reviews.llvm.org/D59974 llvm-svn: 357274
* 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
* [clang-doc] Switch to default to all-TUs executorJulie Hockett2018-10-261-1/+1
| | | | | | | | Since we generally want to document a whole project, not just one file. Differential Revision: https://reviews.llvm.org/D53170 llvm-svn: 345418
* [clang-doc] Limit integration testsJulie Hockett2018-10-161-64/+14
| | | | | | | | | | | | | | | | Now that the clang-doc libraries are covered by unit tests, we don't need to have extensive (and unmaintainable) integration tests. This replaces the integration test suite with a smaller one that just tests the tool itself and removes extraneous dumping logic from the tool itself. Includes tests that cover the parse->serialize->merge->generate pipeline, as well as tests for the --public, --format, --doxygen, and --output flags. Differential Revision: https://reviews.llvm.org/D53150 llvm-svn: 344655
* Reland "Implement a (simple) Markdown generator"Julie Hockett2018-09-111-17/+26
| | | | | | | | 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-26/+17
| | | | | | | 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-17/+26
| | | | | | | | | | | | | | | 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-25/+57
| | | | | | | | | | | | | | | 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-57/+25
| | | | | | This reverts commit r338738 as it's breaking the bots. llvm-svn: 338748
* [clang-doc] Refactoring mapper to map by scopeJulie Hockett2018-08-021-25/+57
| | | | | | | | | | | 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] Adding PublicOnly flagJulie Hockett2018-07-201-3/+8
| | | | | | | | | | | Submitted on behalf of Annie Cherkaev (@anniecherk) Added a flag which, when enabled, documents only those methods and fields which have a Public attribute. Differential Revision: https://reviews.llvm.org/D48395 llvm-svn: 337602
* Fix MSVC 'not all control paths return a value' warning. NFCI.Simon Pilgrim2018-06-061-0/+1
| | | | llvm-svn: 334122
* [clang-doc] Implement a YAML generatorJulie Hockett2018-06-061-12/+57
| | | | | | | | | 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
* [clang-doc] Implement reducer portion of the frontend frameworkJulie Hockett2018-06-041-25/+113
| | | | | | | | | | | | | | | | | | Implements a simple, in-memory reducer for the mapped output of the initial tool. This creates a collection object for storing the deduplicated infos on each declaration, and populates that from the mapper output. The collection object is serialized to LLVM bitstream. On reading each serialized output, it checks to see if a merge is necessary and if so, merges the new info with the existing info (prefering the existing one if conflicts exist). 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/D43341 llvm-svn: 333932
* [clang-doc] Reland "[clang-doc] Setup clang-doc frontend framework"Julie Hockett2018-03-222-0/+131
| | | | | | Fixed windows release build tests. llvm-svn: 328270
* Revert "[clang-doc] Reland "[clang-doc] Setup clang-doc frontend framework""Julie Hockett2018-03-222-131/+0
| | | | | | | This reverts commit r328150 until we can fix the test that are failing on the Windows release build. llvm-svn: 328172
* [clang-doc] Reland "[clang-doc] Setup clang-doc frontend framework"Julie Hockett2018-03-212-0/+131
| | | | | | Fixing the the failing Windows tests. llvm-svn: 328150
* Revert "Reland "[clang-doc] Setup clang-doc frontend framework""Julie Hockett2018-03-122-131/+0
| | | | | | | This reverts commit r327295 since it was causing the Windows bots to fail. llvm-svn: 327346
* Reland "[clang-doc] Setup clang-doc frontend framework"Julie Hockett2018-03-122-0/+131
| | | | | | | There was a missing newline in the docs, and a static_assert that needed to be a normal assert. llvm-svn: 327295
* Revert "[clang-doc] Setup clang-doc frontend framework"Julie Hockett2018-03-092-131/+0
| | | | | | | This reverts commit r327102, since it was breaking the linux-abi-test on x86. llvm-svn: 327103
* [clang-doc] Setup clang-doc frontend frameworkJulie Hockett2018-03-092-0/+131
Setting up the mapper part of the frontend framework for a clang-doc tool. It creates a series of relevant matchers for declarations, and uses the ToolExecutor to traverse the AST and extract the matching declarations and comments. The mapper serializes the extracted information to individual records for reducing and eventually doc generation. 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/D41102 llvm-svn: 327102
OpenPOWER on IntegriCloud