This patch adds support for attribute "overallocated", which will be used to indicate a union or struct is over-allocated. This is needed to have __builtin_object_size correctly compute the size of an object when malloc allocates extra space at the end of a struct or union. For example,
struct S {
int a; char s[32];
};
void *p = malloc(sizeof(S) + 64);
unsigned s = builtin_object_size(((struct S*)p)->s, 1); // "s" should be 32+64=96, not 32.
The link to the relevant discussion on cfe-dev is here:
http://lists.llvm.org/pipermail/cfe-dev/2016-March/047782.html
Instead of "field", how about "non-static data member"? That should make it more clear as to what it pertains to.