This is an archive of the discontinued LLVM Phabricator instance.

[AST] Fix crashes caused by redeclarations in hidden prototypes
ClosedPublic

Authored by bnbarham on Oct 7 2020, 7:59 PM.

Details

Summary

ObjCContainerDecl.getMethod returns a nullptr by default when the
container is a hidden prototype. Callsites where the method is being
looked up on the redeclaration's own container should skip this check
since they (rightly) expect a valid method to be found.

Resolves rdar://69444243

Diff Detail

Event Timeline

bnbarham created this revision.Oct 7 2020, 7:59 PM
Herald added a project: Restricted Project. · View Herald TranscriptOct 7 2020, 7:59 PM
bnbarham requested review of this revision.Oct 7 2020, 7:59 PM
akyrtzi accepted this revision.Oct 7 2020, 8:09 PM

Good catch!

This revision is now accepted and ready to land.Oct 7 2020, 8:09 PM
bnbarham updated this revision to Diff 296859.Oct 7 2020, 8:30 PM

Ran clang-format again

bnbarham updated this revision to Diff 296861.Oct 7 2020, 9:07 PM

Update test to include explicit OSX target triple

bnbarham updated this revision to Diff 297098.Oct 8 2020, 6:25 PM

Removed platform-specific path separator

This revision was automatically updated to reflect the committed changes.