================
@@ -375,19 +375,36 @@ Descriptor::Descriptor(const DeclTy &D, MetadataSize MD)
QualType Descriptor::getType() const {
if (SourceType)
return QualType(SourceType, 0);
- if (const auto *D = asValueDecl())
- return D->getType();
+
if (const auto *T = dyn_cast_if_present<TypeDecl>(asDecl()))
return T->getASTContext().getTypeDeclType(T);
// The Source sometimes has a different type than the once
// we really save. Try to consult the Record first.
if (isRecord()) {
const RecordDecl *RD = ElemRecord->getDecl();
- return RD->getASTContext().getCanonicalTagType(RD);
+ QualType T = RD->getASTContext().getTagType(ElaboratedTypeKeyword::None,
+ std::nullopt, RD, false);
----------------
tbaederr wrote:
Yes, I don't have anymore information to pass anything else.
https://github.com/llvm/llvm-project/pull/200342
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits