check for nullptr when evaluating untypedness

This commit is contained in:
Jasper Geer
2022-11-04 16:29:04 -04:00
parent 92e406cef0
commit e8517e1d02

View File

@@ -1257,6 +1257,9 @@ bool is_type_typed(Type *t) {
}
bool is_type_untyped(Type *t) {
t = base_type(t);
if (t == nullptr) {
return false;
}
if (t->kind == Type_Basic) {
return (t->Basic.flags & BasicFlag_Untyped) != 0;
}