This is an archive of the discontinued LLVM Phabricator instance.

Remove assertion on analysis of rvalue vector
AcceptedPublic

Authored by FlameTop on Nov 23 2016, 6:19 AM.

Details

Summary

ExprEngine::VisitLvalArraySubscriptExpr contains an assert to ensure it is passed either a GLvalue or a small number of C exemptions. This change adds vector types to the assert as these also can be rvalues.

A provided test ensures the assertion no longer fires for vector rvalues.

Diff Detail

Event Timeline

FlameTop updated this revision to Diff 79062.Nov 23 2016, 6:19 AM
FlameTop retitled this revision from to Remove assertion on analysis of rvalue vector.
FlameTop updated this object.
FlameTop added reviewers: zaks.anna, dcoughlin.
FlameTop added a subscriber: cfe-commits.
zaks.anna edited edge metadata.Nov 30 2016, 10:52 AM

Thank you! The assert definitely needs to be relaxed.

Would be great to add test cases that check if the analyzer models the vector types correctly, not just that we do not crash. (Not a blocker, but would be very useful.)

zaks.anna accepted this revision.Nov 30 2016, 10:16 PM
zaks.anna edited edge metadata.
This revision is now accepted and ready to land.Nov 30 2016, 10:16 PM