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 f087b5e commit 283c656Copy full SHA for 283c656
stdlib/public/RemoteInspection/TypeLowering.cpp
@@ -2051,7 +2051,13 @@ class EnumTypeInfoBuilder {
2051
auto *CaseTR = getCaseTypeRef(Case);
2052
assert(CaseTR != nullptr);
2053
auto *CaseTI = TC.getTypeInfo(CaseTR, ExternalTypeInfo);
2054
- if (CaseTI->getSize() == 0) {
+ if (CaseTI == nullptr) {
2055
+ // We don't have typeinfo; assume it's not
2056
+ // zero-sized to match earlier behavior.
2057
+ // TODO: Maybe this should prompt us to fall
2058
+ // back to UnsupportedEnumTypeInfo??
2059
+ PayloadCases.push_back(Case);
2060
+ } else if (CaseTI->getSize() == 0) {
2061
// Zero-sized payloads get special treatment
2062
++EmptyPayloadCases;
2063
} else {
0 commit comments