Skip to content

Commit d3d69c6

Browse files
author
bors-servo
authored
Auto merge of #1227 - emilio:non-floating-type-complex, r=fitzgen
ir: Handle _Complex _Float128 correctly. Unfortunately we can't test it for the same alignment issues that "long double" has. I also included the diagnostic code, just in case it happens again.
2 parents 13f2b9a + ea603ce commit d3d69c6

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/ir/context.rs

+8-1
Original file line numberDiff line numberDiff line change
@@ -1970,7 +1970,14 @@ impl BindgenContext {
19701970
CXType_Float => FloatKind::Float,
19711971
CXType_Double => FloatKind::Double,
19721972
CXType_LongDouble => FloatKind::LongDouble,
1973-
_ => panic!("Non floating-type complex?"),
1973+
CXType_Float128 => FloatKind::Float128,
1974+
_ => {
1975+
panic!(
1976+
"Non floating-type complex? {:?}, {:?}",
1977+
ty,
1978+
float_type,
1979+
)
1980+
},
19741981
};
19751982
TypeKind::Complex(float_kind)
19761983
}

0 commit comments

Comments
 (0)