This is an archive of the discontinued LLVM Phabricator instance.

[libcxxabi] Fix multi-level pointer conversions and pointer to member conversion detection.
ClosedPublic

Authored by EricWF on Mar 31 2015, 7:53 PM.

Details

Summary

Currently there are bugs in out detection of multi-level pointer conversions and pointer to member conversions. This patch fixes the following issues.

  • Allow multi-level pointers with different nested qualifiers.
  • Allow multi-level mixed pointers to objects and pointers to members with different nested qualifiers.
  • Allow conversions from int Base::* to int Derived::* but only for non-nested pointers.

There is still some work that needs to be done to clean this patch up but I want to get some input on it.
Open questions:

  • Does __pointer_to_member_type_info::can_catch(...) need to adjust the pointer if a base to derived conversion is performed?

Diff Detail

Event Timeline

EricWF updated this revision to Diff 23027.Mar 31 2015, 7:53 PM
EricWF retitled this revision from to [libcxxabi] Fix multi-level pointer conversions and pointer to member conversion detection..
EricWF updated this object.
EricWF edited the test plan for this revision. (Show Details)
EricWF added reviewers: mclow.lists, danalbert, compnerd.
EricWF added a subscriber: Unknown Object (MLST).
EricWF updated this revision to Diff 23056.Apr 1 2015, 8:08 AM

I've cleaned up the source and separated the tests into their respective files. I think this patch is ready to go.

mclow.lists accepted this revision.Apr 2 2015, 3:57 PM
mclow.lists edited edge metadata.

This LGTM - thanks, Eric!

[ Eric answered my concerns about ref-qualified member fns via IRC ]

This revision is now accepted and ready to land.Apr 2 2015, 3:57 PM
EricWF closed this revision.Apr 2 2015, 4:29 PM