[all-commits] [llvm/llvm-project] eed225: [clang-doc] Add typedef/using information.

Paul Kirth via All-commits all-commits at lists.llvm.org
Tue Sep 27 16:35:34 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: eed22583fd78d4d657fb70b99e62fbdc1f83b8f9
      https://github.com/llvm/llvm-project/commit/eed22583fd78d4d657fb70b99e62fbdc1f83b8f9
  Author: Brett Wilson <brettw at google.com>
  Date:   2022-09-27 (Tue, 27 Sep 2022)

  Changed paths:
    M clang-tools-extra/clang-doc/BitcodeReader.cpp
    M clang-tools-extra/clang-doc/BitcodeWriter.cpp
    M clang-tools-extra/clang-doc/BitcodeWriter.h
    M clang-tools-extra/clang-doc/HTMLGenerator.cpp
    M clang-tools-extra/clang-doc/MDGenerator.cpp
    M clang-tools-extra/clang-doc/Mapper.cpp
    M clang-tools-extra/clang-doc/Mapper.h
    M clang-tools-extra/clang-doc/Representation.cpp
    M clang-tools-extra/clang-doc/Representation.h
    M clang-tools-extra/clang-doc/Serialize.cpp
    M clang-tools-extra/clang-doc/Serialize.h
    M clang-tools-extra/clang-doc/YAMLGenerator.cpp
    M clang-tools-extra/unittests/clang-doc/BitcodeTest.cpp
    M clang-tools-extra/unittests/clang-doc/ClangDocTest.cpp
    M clang-tools-extra/unittests/clang-doc/ClangDocTest.h
    M clang-tools-extra/unittests/clang-doc/HTMLGeneratorTest.cpp
    M clang-tools-extra/unittests/clang-doc/MDGeneratorTest.cpp
    M clang-tools-extra/unittests/clang-doc/MergeTest.cpp
    M clang-tools-extra/unittests/clang-doc/SerializeTest.cpp
    M clang-tools-extra/unittests/clang-doc/YAMLGeneratorTest.cpp

  Log Message:
  -----------
  [clang-doc] Add typedef/using information.

Read typedef and "using" type alias declarations and serialize into the internal structures. Emit this information in the YAML output. The HTML and MD generators are unchanged.

Separate out the logic to create the parent namespace or record object and insert the newly created child into it. This logic was previously duplicated for every "info" type and is now shared.

To help this, a struct containing the child vectors was separated out so children can be added generically and without having too many templates.

A small change was made to populateParentNamespaces() to allow using types that aren't themselves DeclContexts (typedefs are the first example of this).

Reviewed By: paulkirth, haowei

Differential Revision: https://reviews.llvm.org/D134371




More information about the All-commits mailing list