File tree 2 files changed +6
-3
lines changed
2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -215,6 +215,7 @@ impl TemplateInstantiation {
215
215
/// Parse a `TemplateInstantiation` from a clang `Type`.
216
216
pub ( crate ) fn from_ty (
217
217
ty : & clang:: Type ,
218
+ parent_id : Option < ItemId > ,
218
219
ctx : & mut BindgenContext ,
219
220
) -> Option < TemplateInstantiation > {
220
221
use clang_sys:: * ;
@@ -228,13 +229,15 @@ impl TemplateInstantiation {
228
229
args. chain ( canonical_args. skip ( arg_count) )
229
230
. filter ( |t| t. kind ( ) != CXType_Invalid )
230
231
. map ( |t| {
231
- Item :: from_ty_or_ref ( t, t. declaration ( ) , None , ctx)
232
+ Item :: from_ty_or_ref ( t, t. declaration ( ) , parent_id , ctx)
232
233
} )
233
234
. collect ( )
234
235
}
235
236
None => args
236
237
. filter ( |t| t. kind ( ) != CXType_Invalid )
237
- . map ( |t| Item :: from_ty_or_ref ( t, t. declaration ( ) , None , ctx) )
238
+ . map ( |t| {
239
+ Item :: from_ty_or_ref ( t, t. declaration ( ) , parent_id, ctx)
240
+ } )
238
241
. collect ( ) ,
239
242
} ) ;
240
243
Original file line number Diff line number Diff line change @@ -746,7 +746,7 @@ impl Type {
746
746
( ty. template_args ( ) . is_some ( ) && ty_kind != CXType_Typedef )
747
747
{
748
748
// This is a template instantiation.
749
- match TemplateInstantiation :: from_ty ( ty, ctx) {
749
+ match TemplateInstantiation :: from_ty ( ty, parent_id , ctx) {
750
750
Some ( inst) => TypeKind :: TemplateInstantiation ( inst) ,
751
751
None => TypeKind :: Opaque ,
752
752
}
You can’t perform that action at this time.
0 commit comments