mirror of
https://github.com/JakeHillion/object-introspection.git
synced 2024-09-19 11:09:05 +01:00
Support type::Attributed in Clang Parser (#496)
This commit is contained in:
parent
3513f9580a
commit
8e5cdf8d04
@ -112,6 +112,8 @@ Type& ClangTypeParser::enumerateType(const clang::Type& ty) {
|
||||
case clang::Type::MemberPointer:
|
||||
return enumerateMemberPointer(
|
||||
llvm::cast<const clang::MemberPointerType>(ty));
|
||||
case clang::Type::Attributed:
|
||||
return enumerateAttributed(llvm::cast<const clang::AttributedType>(ty));
|
||||
|
||||
default:
|
||||
throw std::logic_error(std::string("unsupported TypeClass `") +
|
||||
@ -395,6 +397,10 @@ Type& ClangTypeParser::enumerateMemberPointer(
|
||||
return makeType<Primitive>(ty, Primitive::Kind::StubbedPointer);
|
||||
}
|
||||
|
||||
Type& ClangTypeParser::enumerateAttributed(const clang::AttributedType& ty) {
|
||||
return enumerateType(*ty.getEquivalentType());
|
||||
}
|
||||
|
||||
Type& ClangTypeParser::enumerateSubstTemplateTypeParm(
|
||||
const clang::SubstTemplateTypeParmType& ty) {
|
||||
// Clang wraps any type that was substituted from e.g. `T` in this type. It
|
||||
|
@ -22,6 +22,7 @@
|
||||
#include "oi/type_graph/TypeGraph.h"
|
||||
|
||||
namespace clang {
|
||||
class AttributedType;
|
||||
class ASTContext;
|
||||
class BuiltinType;
|
||||
class ConstantArrayType;
|
||||
@ -108,6 +109,7 @@ class ClangTypeParser {
|
||||
Typedef& enumerateUsing(const clang::UsingType&);
|
||||
Type& enumerateUnaryTransformType(const clang::UnaryTransformType&);
|
||||
Type& enumerateDecltypeType(const clang::DecltypeType&);
|
||||
Type& enumerateAttributed(const clang::AttributedType&);
|
||||
|
||||
Array& enumerateArray(const clang::ConstantArrayType&);
|
||||
Enum& enumerateEnum(const clang::EnumType&);
|
||||
|
Loading…
Reference in New Issue
Block a user