def ext_freestanding_complex : Extension<
"complex numbers are an extension in a freestanding C99 implementation">;
+// FIXME: Remove when we support imaginary.
+def err_imaginary_not_supported : Error<"imaginary types are not supported">;
// Obj-c expressions
def warn_root_inst_method_not_found : Warning<
Result = Context.getVectorType(Result, 128/typeSize, AltiVecSpec);
}
- assert(DS.getTypeSpecComplex() != DeclSpec::TSC_imaginary &&
- "FIXME: imaginary types not supported yet!");
+ // FIXME: Imaginary.
+ if (DS.getTypeSpecComplex() == DeclSpec::TSC_imaginary)
+ TheSema.Diag(DS.getTypeSpecComplexLoc(), diag::err_imaginary_not_supported);
// See if there are any attributes on the declspec that apply to the type (as
// opposed to the decl).
--- /dev/null
+// RUN: %clang_cc1 -verify -emit-llvm-only %s
+
+// Just verify that we don't crash until we support _Imaginary.
+double _Imaginary foo; // expected-error {{imaginary types are not supported}}