This is an archive of the discontinued LLVM Phabricator instance.

[clang] Do not crash in APValue::prettyPrint() on forward-decl structs.
ClosedPublic

Authored by adamcz on Nov 10 2021, 7:30 AM.

Details

Summary

The call to getTypeSizeInChars() is replaced with
getTypeSizeInCharsIfKnown(), which does not crash on forward declared
structs. This only affects printing.

Diff Detail

Event Timeline

adamcz created this revision.Nov 10 2021, 7:30 AM
adamcz requested review of this revision.Nov 10 2021, 7:30 AM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptNov 10 2021, 7:30 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript
hokein accepted this revision.Nov 10 2021, 7:44 AM

Thanks!

This revision is now accepted and ready to land.Nov 10 2021, 7:44 AM