mirror of
https://github.com/JakeHillion/object-introspection.git
synced 2024-11-09 21:24:14 +00: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:
|
case clang::Type::MemberPointer:
|
||||||
return enumerateMemberPointer(
|
return enumerateMemberPointer(
|
||||||
llvm::cast<const clang::MemberPointerType>(ty));
|
llvm::cast<const clang::MemberPointerType>(ty));
|
||||||
|
case clang::Type::Attributed:
|
||||||
|
return enumerateAttributed(llvm::cast<const clang::AttributedType>(ty));
|
||||||
|
|
||||||
default:
|
default:
|
||||||
throw std::logic_error(std::string("unsupported TypeClass `") +
|
throw std::logic_error(std::string("unsupported TypeClass `") +
|
||||||
@ -395,6 +397,10 @@ Type& ClangTypeParser::enumerateMemberPointer(
|
|||||||
return makeType<Primitive>(ty, Primitive::Kind::StubbedPointer);
|
return makeType<Primitive>(ty, Primitive::Kind::StubbedPointer);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Type& ClangTypeParser::enumerateAttributed(const clang::AttributedType& ty) {
|
||||||
|
return enumerateType(*ty.getEquivalentType());
|
||||||
|
}
|
||||||
|
|
||||||
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
|
||||||
|
@ -22,6 +22,7 @@
|
|||||||
#include "oi/type_graph/TypeGraph.h"
|
#include "oi/type_graph/TypeGraph.h"
|
||||||
|
|
||||||
namespace clang {
|
namespace clang {
|
||||||
|
class AttributedType;
|
||||||
class ASTContext;
|
class ASTContext;
|
||||||
class BuiltinType;
|
class BuiltinType;
|
||||||
class ConstantArrayType;
|
class ConstantArrayType;
|
||||||
@ -108,6 +109,7 @@ class ClangTypeParser {
|
|||||||
Typedef& enumerateUsing(const clang::UsingType&);
|
Typedef& enumerateUsing(const clang::UsingType&);
|
||||||
Type& enumerateUnaryTransformType(const clang::UnaryTransformType&);
|
Type& enumerateUnaryTransformType(const clang::UnaryTransformType&);
|
||||||
Type& enumerateDecltypeType(const clang::DecltypeType&);
|
Type& enumerateDecltypeType(const clang::DecltypeType&);
|
||||||
|
Type& enumerateAttributed(const clang::AttributedType&);
|
||||||
|
|
||||||
Array& enumerateArray(const clang::ConstantArrayType&);
|
Array& enumerateArray(const clang::ConstantArrayType&);
|
||||||
Enum& enumerateEnum(const clang::EnumType&);
|
Enum& enumerateEnum(const clang::EnumType&);
|
||||||
|
Loading…
Reference in New Issue
Block a user