This is an archive of the discontinued LLVM Phabricator instance.

[Sema] Avoid crash for category implementation without interface
ClosedPublic

Authored by smeenai on Mar 26 2018, 7:25 PM.

Details

Summary

When we have a category implementation without a corresponding interface
(which is an error by itself), semantic checks for property accesses
will attempt to access a null interface declaration and then segfault.
Error out in such cases instead.

I'm not sure if it's best to add the null check where I've added it or
if it should be fixed further up the stack.

Diff Detail

Event Timeline

smeenai created this revision.Mar 26 2018, 7:25 PM

I think that's a fine place to add the check.

rjmccall accepted this revision.Mar 27 2018, 9:25 AM
This revision is now accepted and ready to land.Mar 27 2018, 9:25 AM
This revision was automatically updated to reflect the committed changes.