mirror of
https://github.com/JakeHillion/object-introspection.git
synced 2024-09-19 11:09:05 +01:00
ClangTypeParser: handle clang::MemberPointer (#493)
This commit is contained in:
parent
7e71dc6192
commit
472a7366ee
@ -109,6 +109,9 @@ Type& ClangTypeParser::enumerateType(const clang::Type& ty) {
|
|||||||
return enumerateArray(llvm::cast<const clang::ConstantArrayType>(ty));
|
return enumerateArray(llvm::cast<const clang::ConstantArrayType>(ty));
|
||||||
case clang::Type::Enum:
|
case clang::Type::Enum:
|
||||||
return enumerateEnum(llvm::cast<const clang::EnumType>(ty));
|
return enumerateEnum(llvm::cast<const clang::EnumType>(ty));
|
||||||
|
case clang::Type::MemberPointer:
|
||||||
|
return enumerateMemberPointer(
|
||||||
|
llvm::cast<const clang::MemberPointerType>(ty));
|
||||||
|
|
||||||
default:
|
default:
|
||||||
throw std::logic_error(std::string("unsupported TypeClass `") +
|
throw std::logic_error(std::string("unsupported TypeClass `") +
|
||||||
@ -385,6 +388,12 @@ Type& ClangTypeParser::enumeratePointer(const clang::PointerType& ty) {
|
|||||||
return makeType<Reference>(ty, t);
|
return makeType<Reference>(ty, t);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Type& ClangTypeParser::enumerateMemberPointer(
|
||||||
|
const clang::MemberPointerType& ty) {
|
||||||
|
// TODO: chase anything not a function pointer (same as regular pointers).
|
||||||
|
return makeType<Primitive>(ty, Primitive::Kind::StubbedPointer);
|
||||||
|
}
|
||||||
|
|
||||||
Type& ClangTypeParser::enumerateSubstTemplateTypeParm(
|
Type& ClangTypeParser::enumerateSubstTemplateTypeParm(
|
||||||
const clang::SubstTemplateTypeParmType& ty) {
|
const clang::SubstTemplateTypeParmType& ty) {
|
||||||
// Clang wraps any type that was substituted from e.g. `T` in this type. It
|
// Clang wraps any type that was substituted from e.g. `T` in this type. It
|
||||||
|
@ -29,6 +29,7 @@ class DecltypeType;
|
|||||||
class ElaboratedType;
|
class ElaboratedType;
|
||||||
class EnumType;
|
class EnumType;
|
||||||
class LValueReferenceType;
|
class LValueReferenceType;
|
||||||
|
class MemberPointerType;
|
||||||
class PointerType;
|
class PointerType;
|
||||||
class RecordType;
|
class RecordType;
|
||||||
class Sema;
|
class Sema;
|
||||||
@ -97,6 +98,7 @@ class ClangTypeParser {
|
|||||||
Type& enumerateClass(const clang::RecordType&);
|
Type& enumerateClass(const clang::RecordType&);
|
||||||
Type& enumerateReference(const clang::LValueReferenceType&);
|
Type& enumerateReference(const clang::LValueReferenceType&);
|
||||||
Type& enumeratePointer(const clang::PointerType&);
|
Type& enumeratePointer(const clang::PointerType&);
|
||||||
|
Type& enumerateMemberPointer(const clang::MemberPointerType&);
|
||||||
Type& enumerateSubstTemplateTypeParm(const clang::SubstTemplateTypeParmType&);
|
Type& enumerateSubstTemplateTypeParm(const clang::SubstTemplateTypeParmType&);
|
||||||
Primitive& enumeratePrimitive(const clang::BuiltinType&);
|
Primitive& enumeratePrimitive(const clang::BuiltinType&);
|
||||||
Type& enumerateElaboratedType(const clang::ElaboratedType&);
|
Type& enumerateElaboratedType(const clang::ElaboratedType&);
|
||||||
|
Loading…
Reference in New Issue
Block a user