summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/unittests/clang-doc/BitcodeTest.cpp
diff options
context:
space:
mode:
authorJulie Hockett <juliehockett@google.com>2019-06-24 19:31:02 +0000
committerJulie Hockett <juliehockett@google.com>2019-06-24 19:31:02 +0000
commitb1f01e27ec0cea2f28eaa2026aa1e63a3b2ae0f0 (patch)
treec35282329e294ecf439e4908611a8a61345ac6e9 /clang-tools-extra/unittests/clang-doc/BitcodeTest.cpp
parentea08248b2bc9ab6cd14cfd1a05c4fb0fae49e97a (diff)
downloadbcm5719-llvm-b1f01e27ec0cea2f28eaa2026aa1e63a3b2ae0f0.tar.gz
bcm5719-llvm-b1f01e27ec0cea2f28eaa2026aa1e63a3b2ae0f0.zip
[clang-doc] Add basic support for templates and typedef
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. Submitted on behalf of Diego Astiazarán (diegoaat97@gmail.com) Differential Revision: https://reviews.llvm.org/D63367 llvm-svn: 364222
Diffstat (limited to 'clang-tools-extra/unittests/clang-doc/BitcodeTest.cpp')
-rw-r--r--clang-tools-extra/unittests/clang-doc/BitcodeTest.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/clang-tools-extra/unittests/clang-doc/BitcodeTest.cpp b/clang-tools-extra/unittests/clang-doc/BitcodeTest.cpp
index c89a6491b6c..a22f8af7394 100644
--- a/clang-tools-extra/unittests/clang-doc/BitcodeTest.cpp
+++ b/clang-tools-extra/unittests/clang-doc/BitcodeTest.cpp
@@ -80,6 +80,7 @@ TEST(BitcodeTest, emitRecordInfoBitcode) {
I.Members.emplace_back("int", "X", AccessSpecifier::AS_private);
I.TagType = TagTypeKind::TTK_Class;
+ I.IsTypeDef = true;
I.Parents.emplace_back(EmptySID, "F", InfoType::IT_record);
I.VirtualParents.emplace_back(EmptySID, "G", InfoType::IT_record);
OpenPOWER on IntegriCloud