[PATCH] D63367: [clang-doc] Add basic support for templates and typedef

Diego Astiazarán via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Jun 14 15:39:51 PDT 2019


DiegoAstiazaran created this revision.
DiegoAstiazaran added reviewers: juliehockett, jakehehrlich, lebedev.ri.
DiegoAstiazaran added a project: clang-tools-extra.
Herald added subscribers: kadircet, arphaman.

In serialize::parseBases(...), when a base record is a template specialization, the specialization was used as the parent. It should be the base template so there is only one file generated for this record. When the specialized template is implicitly declared the reference USR corresponded to the GlobalNamespace's USR, this will now be the base template's USR.
More information about templates will be added later.

In serialize::emiInfo(RecorDecl*, ...), typedef records were not handled and the name was empty. This is now handled and a IsTypeDef attribute is added to RecordInfo struct.

In serialize::emitInfo(CXXMethodDecl*, ...), template specialization is handled like in serialize::parseBases(...).

Bitcode writer and reader are modified to handle the new attribute of RecordInfo.


https://reviews.llvm.org/D63367

Files:
  clang-tools-extra/clang-doc/BitcodeReader.cpp
  clang-tools-extra/clang-doc/BitcodeWriter.cpp
  clang-tools-extra/clang-doc/BitcodeWriter.h
  clang-tools-extra/clang-doc/Representation.h
  clang-tools-extra/clang-doc/Serialize.cpp
  clang-tools-extra/unittests/clang-doc/BitcodeTest.cpp
  clang-tools-extra/unittests/clang-doc/ClangDocTest.cpp
  clang-tools-extra/unittests/clang-doc/SerializeTest.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D63367.204865.patch
Type: text/x-patch
Size: 11016 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190614/057651b1/attachment.bin>


More information about the cfe-commits mailing list