rsmith added inline comments. ================ Comment at: include/clang/Basic/AttrDocs.td:2073-2079 @@ +2072,9 @@ + let Content = [{ +Use ``overallocated`` to indicate a struct or union is over-allocated. For example, + +.. code-block:: c++ + +struct S { + char a[4], char b[4]; +} __attribute__((overallocated)); + ---------------- I don't think this says what you mean. "Overallocated" alone does not imply that you can use S::b to access more than 4 bytes. If you want that to work, I think the right model is for the attribute to imply that the final member within the struct is treated as a flexible array member, no matter what its array bound is.
This should then apply to everywhere we consider flexible array members, not just to builtin_object_size. http://reviews.llvm.org/D21453 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits