Revert "[clang] Fix a crash in constant evaluation"

This reverts commit a5ab650714d05c2e49ec158dc99156118a893027.
This commit is contained in:
Kadir Cetinkaya 2022-08-31 10:12:52 +02:00
parent a5ab650714
commit b58ed43a7f
No known key found for this signature in database
GPG Key ID: E39E36B8D2057ED6

View File

@ -4794,11 +4794,6 @@ static bool getDefaultInitValue(QualType T, APValue &Result) {
Result = APValue((const FieldDecl *)nullptr);
return true;
}
// Can't access properties of an incomplete type.
if (!RD->hasDefinition()) {
Result = APValue();
return false;
}
Result = APValue(APValue::UninitStruct(), RD->getNumBases(),
std::distance(RD->field_begin(), RD->field_end()));