return test_atomic_type_flag(type->atomic.akind, ATOMIC_TYPE_FLAG_FLOAT);
}
+/**
+ * Returns true if the given type is an complex type.
+ *
+ * @param type The type to check.
+ * @return True if type is a complex type.
+ */
+bool is_type_complex(const type_t *type)
+{
+ assert(!is_typeref(type));
+
+ if (type->kind != TYPE_ATOMIC)
+ return false;
+
+ return test_atomic_type_flag(type->atomic.akind, ATOMIC_TYPE_FLAG_COMPLEX);
+}
+
/**
* Returns true if the given type is a signed type.
*
*/
bool is_type_float(const type_t *type);
+/**
+ * returns true if type contains complex numbers
+ */
+bool is_type_complex(const type_t *type);
+
bool is_type_real(const type_t *type);
/**