Page MenuHomePhabricator

[libcxx] Fix use of operator comma where the types can be user defined
ClosedPublic

Authored by EricWF on Oct 22 2014, 11:20 PM.

Details

Summary

An evil user might overload operator comma. Use a void cast to make sure any user overload is not selected.
Modify all the test iterators to define operator comma.

Diff Detail

Event Timeline

EricWF updated this revision to Diff 15301.Oct 22 2014, 11:20 PM
EricWF retitled this revision from to [libcxx] Fix use of operator comma where the types can be user defined.
EricWF updated this object.
EricWF edited the test plan for this revision. (Show Details)
EricWF added reviewers: mclow.lists, danalbert.
EricWF added a subscriber: Unknown Object (MLST).
mclow.lists accepted this revision.Oct 23 2014, 11:45 AM
mclow.lists edited edge metadata.

LGTM.

This revision is now accepted and ready to land.Oct 23 2014, 11:45 AM
EricWF updated this revision to Diff 15342.Oct 23 2014, 12:46 PM
EricWF edited edge metadata.

I think that it's better to make the call to the comma operator a compile failure as opposed to a runtime error. It's easier to track down and doesn't require 100% test coverage to find all comma operator uses. @Marshell, Please let me know if you have an objection.

EricWF closed this revision.Oct 27 2014, 12:38 PM