summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ir/ty.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/ir/ty.rs b/src/ir/ty.rs
index d74b1a0e..bf45b9fc 100644
--- a/src/ir/ty.rs
+++ b/src/ir/ty.rs
@@ -631,6 +631,13 @@ impl Type {
.expect("Not able to resolve array element?");
TypeKind::Array(inner, ty.num_elements())
}
+ // A complex number is always a real and an imaginary part, so
+ // represent that as a two-item array.
+ CXType_Complex => {
+ let inner = Item::from_ty(&ty.elem_type(), location, parent_id, ctx)
+ .expect("Not able to resolve array element?");
+ TypeKind::Array(inner, 2)
+ }
#[cfg(not(feature="llvm_stable"))]
CXType_Elaborated => {
return Self::from_clang_ty(potential_id, &ty.named(),