This is an archive of the discontinued LLVM Phabricator instance.

[Objective-c] Fix a crash in WeakObjectProfileTy::getBaseInfo
ClosedPublic

Authored by ahatanak on Mar 18 2016, 8:15 AM.

Details

Summary

The crash occurs in WeakObjectProfileTy::getBaseInfo when getBase() is called on an ObjCPropertyRefExpr object whose receiver is an interface. This patch fixes the crash by checking the type of the receiver and setting IsExact to true if it is an interface.

Diff Detail

Repository
rL LLVM

Event Timeline

ahatanak updated this revision to Diff 51025.Mar 18 2016, 8:15 AM
ahatanak retitled this revision from to [Objective-c] Fix a crash in WeakObjectProfileTy::getBaseInfo.
ahatanak updated this object.
ahatanak added a reviewer: jordan_rose.
ahatanak added a subscriber: cfe-commits.
jordan_rose accepted this revision.Mar 18 2016, 9:55 AM
jordan_rose edited edge metadata.

Ah, of course! Thanks for catching this, Akira. Can you add this case to the table in the doc comment for WeakObjectProfileTy? (That's how I convinced myself it was correct.)

This revision is now accepted and ready to land.Mar 18 2016, 9:55 AM
This revision was automatically updated to reflect the committed changes.