Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions lib/ffi/clang/lib/type.rb
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,9 @@ class CXType < FFI::Struct
attach_function :get_exception_specification_type, :clang_getExceptionSpecificationType, [CXType.by_value], :exception_specification_type

attach_function :equal_types, :clang_equalTypes, [CXType.by_value, CXType.by_value], :uint

attach_function :get_num_template_arguments, :clang_Type_getNumTemplateArguments, [CXType.by_value], :int
attach_function :get_template_argument_as_type, :clang_Type_getTemplateArgumentAsType, [CXType.by_value, :uint], CXType.by_value
end
end
end
10 changes: 9 additions & 1 deletion lib/ffi/clang/types/type.rb
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,15 @@ def declaration
end

def non_reference_type
Type.create Lib.get_non_reference_type(@type),@translation_unit
Type.create Lib.get_non_reference_type(@type), @translation_unit
end

def template_argument_type(index)
Type.create Lib.get_template_argument_as_type(@type, index), @translation_unit
end

def num_template_arguments
Lib.get_num_template_arguments(@type)
end

def ==(other)
Expand Down