This is an archive of the discontinued LLVM Phabricator instance.

[Sema] Only relax array-at-end-of-object checks in __builtin_object_size when -fno-strict-aliasing is given.
Needs ReviewPublic

Authored by george.burgess.iv on Sep 27 2016, 8:45 PM.

Details

Reviewers
joerg
rsmith
Summary

Mostly asking for a review to verify that you guys are happy with this approach.

Given that Hal said struct-path-tbaa doesn't really deal with arrays (yet), I decided to ignore -fno-struct-path-tbaa. If that changes in the future, we can relax this when that flag is given, too.

Diff Detail

Event Timeline

george.burgess.iv retitled this revision from to [Sema] Only relax array-at-end-of-object checks in __builtin_object_size when -fno-strict-aliasing is given..
george.burgess.iv updated this object.
george.burgess.iv added reviewers: joerg, rsmith.
george.burgess.iv added a subscriber: cfe-commits.

Just want to give you a heads up that I was going to abandon the patch that adds support for attribute "flexible_array" (https://reviews.llvm.org/D21453) after r281277, but I'll probably need the attribute after all if we are going to make the changes in this patch.

Depends on D21453.

Adding a dependency as a reminder to look into D21453 before committing this patch.