This is an archive of the discontinued LLVM Phabricator instance.

[AST][ObjC] Fix crash when printing invalid objc categories
ClosedPublic

Authored by dgoldman on Jul 9 2020, 2:37 PM.

Details

Summary

If no valid interface definition was found previously we would crash.

With this change instead we just print <<error-type>> in place
of the NULL interface. In the future this could be improved by
saving the invalid interface's name and using that.

Diff Detail

Event Timeline

dgoldman created this revision.Jul 9 2020, 2:37 PM
Herald added a project: Restricted Project. · View Herald TranscriptJul 9 2020, 2:37 PM
Herald added a subscriber: cfe-commits. · View Herald Transcript
gribozavr2 accepted this revision.Jul 10 2020, 11:04 AM
gribozavr2 added a subscriber: gribozavr2.
gribozavr2 added inline comments.
clang/unittests/AST/DeclPrinterTest.cpp
180

/*PolicyModifier=*/ (with equal sign) (also below for AllowError comments)

This revision is now accepted and ready to land.Jul 10 2020, 11:04 AM
This revision was automatically updated to reflect the committed changes.