[clang-doc] Centralize TypeInfo creation.
authorBrett Wilson <brettw@google.com>
Tue, 20 Sep 2022 17:54:28 +0000 (17:54 +0000)
committerPaul Kirth <paulkirth@google.com>
Tue, 20 Sep 2022 17:55:47 +0000 (17:55 +0000)
commit4df84ac377dfc88da0217dc8cbb9aa69be6cbe55
tree58e9207e2d1585fbc1963a2cbea04942930e123d
parentdce68873360097be77ff8b3ce68b6eedc612fbef
[clang-doc] Centralize TypeInfo creation.

Several different places in the code had similar computations for the parameters that were eventually passed to the TypeInfo constructor.

This centralizes that code in one function, and allows passing TypeInfo to the various other *Info structures that need it.

Remove some "auto" types and replace with the real type for getting declarations. This was making some duplicate checking difficult to see.

Reviewed By: paulkirth

Differential Revision: https://reviews.llvm.org/D134225
clang-tools-extra/clang-doc/Representation.h
clang-tools-extra/clang-doc/Serialize.cpp