summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/clang.rs14
-rw-r--r--src/ir/ty.rs3
2 files changed, 10 insertions, 7 deletions
diff --git a/src/clang.rs b/src/clang.rs
index 9cf51436..b436a78d 100644
--- a/src/clang.rs
+++ b/src/clang.rs
@@ -778,12 +778,14 @@ impl Type {
// Yep, the spelling of this containing type-parameter is extremely
// nasty... But can happen in <type_traits>. Unfortunately I couldn't
// reduce it enough :(
- !self.spelling().contains("type-parameter") &&
- self.template_args()
- .map_or(false, |mut args| {
- args.len() > 0 &&
- !args.any(|t| t.spelling().contains("type-parameter"))
- })
+ self.template_args().map_or(false, |args| {
+ args.len() > 0
+ }) && match self.declaration().kind() {
+ CXCursor_ClassTemplatePartialSpecialization |
+ CXCursor_TypeAliasTemplateDecl |
+ CXCursor_TemplateTemplateParameter => false,
+ _ => true,
+ }
}
}
diff --git a/src/ir/ty.rs b/src/ir/ty.rs
index 5474aa57..cb566fb3 100644
--- a/src/ir/ty.rs
+++ b/src/ir/ty.rs
@@ -602,7 +602,8 @@ impl Type {
// Same here, with template specialisations we can safely
// assume this is a Comp(..)
} else if ty.is_fully_specialized_template() {
- debug!("Template specialization: {:?}", ty);
+ debug!("Template specialization: {:?}, {:?} {:?}",
+ ty, location, canonical_ty);
let complex =
CompInfo::from_ty(potential_id, ty, location, ctx)
.expect("C'mon");