From 0c1800a9c9507dd1b06c70cb8950b13afe09f758 Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Fri, 13 Jan 2017 17:33:19 -0500 Subject: fix some stuff when llvm has assertions on --- src/parseh.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/parseh.cpp') diff --git a/src/parseh.cpp b/src/parseh.cpp index 7e04a78d36..94f430cdfa 100644 --- a/src/parseh.cpp +++ b/src/parseh.cpp @@ -934,7 +934,7 @@ static TypeTableEntry *resolve_record_decl(Context *c, const RecordDecl *record_ TypeTableEntry *field_type = resolve_qual_type(c, field_decl->getType(), field_decl); type_struct_field->type_entry = field_type; - if (field_type->id == TypeTableEntryIdInvalid) { + if (type_is_invalid(field_type) || !type_is_complete(field_type)) { emit_warning(c, field_decl, "struct %s demoted to typedef - unresolved type\n", buf_ptr(bare_name)); replace_with_fwd_decl(c, struct_type, full_type_name); return struct_type; -- cgit v1.2.3