We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bad4460 commit f39c289Copy full SHA for f39c289
clang/lib/CIR/CodeGen/CIRGenTypes.cpp
@@ -424,8 +424,8 @@ mlir::Type CIRGenTypes::convertType(QualType type) {
424
// TODO(cir): Implement updateCompletedType for enums.
425
assert(!cir.MissingFeatures::updateCompletedType());
426
const EnumDecl *ED = cast<EnumType>(ty)->getDecl();
427
- if (ED->isCompleteDefinition() || ED->isFixed())
428
- return convertType(ED->getIntegerType());
+ if (auto integerType = ED->getIntegerType(); !integerType.isNull())
+ return convertType(integerType);
429
// Return a placeholder 'i32' type. This can be changed later when the
430
// type is defined (see UpdateCompletedType), but is likely to be the
431
// "right" answer.
0 commit comments