aboutsummaryrefslogtreecommitdiff
path: root/clang-tools-extra/clang-doc/BitcodeReader.cpp
diff options
context:
space:
mode:
authorBrett Wilson <brettw@google.com>2022-08-11 17:11:23 +0000
committerPaul Kirth <paulkirth@google.com>2022-08-11 17:14:15 +0000
commit99baa10f8f01f5c054d259182b24ae04ae57101d (patch)
tree4218bb7f7f696170fa6cdbd20c217e297126dc4e /clang-tools-extra/clang-doc/BitcodeReader.cpp
parentdacbddf56205f90e33d39575fc9d8455458d851e (diff)
downloadllvm-99baa10f8f01f5c054d259182b24ae04ae57101d.zip
llvm-99baa10f8f01f5c054d259182b24ae04ae57101d.tar.gz
llvm-99baa10f8f01f5c054d259182b24ae04ae57101d.tar.bz2
[clang-doc] Read docstrings for record members
Struct/class data members did not have the comments associated with them. This adds that information to the MemberTypeInfo class and emits it in the YAML. This does not update the frontends yet. Reviewed By: paulkirth Differential Revision: https://reviews.llvm.org/D131298
Diffstat (limited to 'clang-tools-extra/clang-doc/BitcodeReader.cpp')
-rw-r--r--clang-tools-extra/clang-doc/BitcodeReader.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/clang-tools-extra/clang-doc/BitcodeReader.cpp b/clang-tools-extra/clang-doc/BitcodeReader.cpp
index 9e0ec99..35e3aef 100644
--- a/clang-tools-extra/clang-doc/BitcodeReader.cpp
+++ b/clang-tools-extra/clang-doc/BitcodeReader.cpp
@@ -350,6 +350,11 @@ template <> llvm::Expected<CommentInfo *> getCommentInfo(RecordInfo *I) {
return &I->Description.back();
}
+template <> llvm::Expected<CommentInfo *> getCommentInfo(MemberTypeInfo *I) {
+ I->Description.emplace_back();
+ return &I->Description.back();
+}
+
template <> llvm::Expected<CommentInfo *> getCommentInfo(EnumInfo *I) {
I->Description.emplace_back();
return &I->Description.back();