[PATCH] D131739: Fix some clang-doc issues.

Brett Wilson via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Aug 11 16:28:17 PDT 2022


brettw created this revision.
brettw added a reviewer: paulkirth.
brettw added a project: clang-tools-extra.
Herald added subscribers: usaxena95, arphaman.
Herald added a project: All.
brettw requested review of this revision.
Herald added a subscriber: cfe-commits.

Always emit the TagType for RecordInfo in YAML output. Previously this omitted the type for "struct", considering it the default. But records in C++ don't really have a default type so always emitting this is more clear.

      

Fix crash on startup when generating HTML code. SmallString (surprisingly) can't handle self-assignment which was happening because parent_path returns a string piece into its argument. This avoids the self-assignment by using another intermediate string.

      

Emit IsTypeDef in YAML. Previously this existed only in the Representation but was never written. Additionally, adds IsTypeDef to the record merge operation which was clearing it (all RecordInfo structures are merged with am empty RecordInfo during the reduce phase).


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D131739

Files:
  clang-tools-extra/clang-doc/Representation.cpp
  clang-tools-extra/clang-doc/Representation.h
  clang-tools-extra/clang-doc/YAMLGenerator.cpp
  clang-tools-extra/clang-doc/tool/ClangDocMain.cpp
  clang-tools-extra/unittests/clang-doc/MergeTest.cpp
  clang-tools-extra/unittests/clang-doc/YAMLGeneratorTest.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D131739.452009.patch
Type: text/x-patch
Size: 4833 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220811/c625d64a/attachment.bin>


More information about the cfe-commits mailing list