Skip to content

Commit eaf638b

Browse files
committed
Use opaque types rather than continuing when template instantiation fails
1 parent 9d8c338 commit eaf638b

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

src/ir/ty.rs

+4-5
Original file line numberDiff line numberDiff line change
@@ -988,11 +988,10 @@ impl Type {
988988
(ty.template_args().is_some() &&
989989
ty_kind != CXType_Typedef) {
990990
// This is a template instantiation.
991-
let inst = match TemplateInstantiation::from_ty(&ty, ctx) {
992-
Some(inst) => inst,
993-
None => return Err(ParseError::Continue),
994-
};
995-
TypeKind::TemplateInstantiation(inst)
991+
match TemplateInstantiation::from_ty(&ty, ctx) {
992+
Some(inst) => TypeKind::TemplateInstantiation(inst),
993+
None => TypeKind::Opaque,
994+
}
996995
} else {
997996
match ty_kind {
998997
CXType_Unexposed if *ty != canonical_ty &&

tests/expectations/tests/builtin-template.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@
44
#![allow(non_snake_case)]
55

66

7-
pub type std_make_integer_sequence<T> = T;
7+
pub type std_make_integer_sequence = u8;

0 commit comments

Comments
 (0)