This is an archive of the discontinued LLVM Phabricator instance.

Fix another case where loop-convert wasn't handling correctly data members.
ClosedPublic

Authored by angelgarcia on Nov 5 2015, 3:11 AM.

Details

Summary

If the container expression was obtained from the point where "size" (which usually is a const method) is invoked, then the topmost node in this expression may be an implicit cast to const.

When the container is a data member, the check was trying to obtain the member expression directly and was failing in the case mentioned above. This is solved by ignoring implicit casts.

Diff Detail

Event Timeline

angelgarcia updated this revision to Diff 39336.Nov 5 2015, 3:11 AM
angelgarcia retitled this revision from to Fix another case where loop-convert wasn't handling correctly data members..
angelgarcia updated this object.
angelgarcia added a reviewer: klimek.
angelgarcia added subscribers: alexfh, cfe-commits.
angelgarcia updated this revision to Diff 39350.Nov 5 2015, 5:52 AM

Update the method comment.

klimek accepted this revision.Nov 6 2015, 1:52 AM
klimek edited edge metadata.

lg

This revision is now accepted and ready to land.Nov 6 2015, 1:52 AM
angelgarcia closed this revision.Nov 6 2015, 2:01 AM