mirror of
https://github.com/JakeHillion/object-introspection.git
synced 2024-11-12 21:56:54 +00: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));
|
||||
case clang::Type::Enum:
|
||||
return enumerateEnum(llvm::cast<const clang::EnumType>(ty));
|
||||
case clang::Type::MemberPointer:
|
||||
return enumerateMemberPointer(
|
||||
llvm::cast<const clang::MemberPointerType>(ty));
|
||||
|
||||
default:
|
||||
throw std::logic_error(std::string("unsupported TypeClass `") +
|
||||
@ -385,6 +388,12 @@ Type& ClangTypeParser::enumeratePointer(const clang::PointerType& ty) {
|
||||
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(
|
||||
const clang::SubstTemplateTypeParmType& ty) {
|
||||
// Clang wraps any type that was substituted from e.g. `T` in this type. It
|
||||
|
@ -29,6 +29,7 @@ class DecltypeType;
|
||||
class ElaboratedType;
|
||||
class EnumType;
|
||||
class LValueReferenceType;
|
||||
class MemberPointerType;
|
||||
class PointerType;
|
||||
class RecordType;
|
||||
class Sema;
|
||||
@ -97,6 +98,7 @@ class ClangTypeParser {
|
||||
Type& enumerateClass(const clang::RecordType&);
|
||||
Type& enumerateReference(const clang::LValueReferenceType&);
|
||||
Type& enumeratePointer(const clang::PointerType&);
|
||||
Type& enumerateMemberPointer(const clang::MemberPointerType&);
|
||||
Type& enumerateSubstTemplateTypeParm(const clang::SubstTemplateTypeParmType&);
|
||||
Primitive& enumeratePrimitive(const clang::BuiltinType&);
|
||||
Type& enumerateElaboratedType(const clang::ElaboratedType&);
|
||||
|
Loading…
Reference in New Issue
Block a user