summaryrefslogtreecommitdiff
path: root/libbindgen/src
diff options
context:
space:
mode:
authorEmilio Cobos Álvarez <ecoal95@gmail.com>2016-11-21 10:19:05 +0100
committerEmilio Cobos Álvarez <ecoal95@gmail.com>2016-11-21 19:18:29 +0100
commit91f279f735e3501cd738e4bff0371b41a830410c (patch)
treea581696fdec9b6614812473509e6798f67457635 /libbindgen/src
parent326796e6af5e05135427fd42475ca20f2de38a41 (diff)
ir: Pass the location instead of the declaration for TemplateRef's.
Diffstat (limited to 'libbindgen/src')
-rw-r--r--libbindgen/src/ir/ty.rs19
1 files changed, 13 insertions, 6 deletions
diff --git a/libbindgen/src/ir/ty.rs b/libbindgen/src/ir/ty.rs
index 1980b088..1e4c40ef 100644
--- a/libbindgen/src/ir/ty.rs
+++ b/libbindgen/src/ir/ty.rs
@@ -685,26 +685,33 @@ impl Type {
CXCursor_TemplateRef => {
let referenced = location.referenced().unwrap();
let referenced_ty = referenced.cur_type();
- let referenced_declaration =
- Some(referenced_ty.declaration());
+
+ debug!("TemplateRef {:?} {:?} {:?}",
+ location,
+ referenced,
+ referenced_ty);
return Self::from_clang_ty(potential_id,
&referenced_ty,
- referenced_declaration,
+ Some(referenced),
parent_id,
ctx);
}
CXCursor_TypeRef => {
let referenced = location.referenced().unwrap();
let referenced_ty = referenced.cur_type();
- let referenced_declaration =
- Some(referenced_ty.declaration());
+ let declaration = referenced_ty.declaration();
+
+ debug!("TypeRef {:?} {:?} {:?}",
+ location,
+ referenced,
+ referenced_ty);
let item =
Item::from_ty_or_ref_with_id(
potential_id,
referenced_ty,
- referenced_declaration,
+ Some(declaration),
parent_id,
ctx);
return Ok(ParseResult::AlreadyResolved(item));