<div dir="ltr"><div>Hello friends,</div><div><br></div><div>I plan to add a function parameter attribute called carry_size (name suggestions welcome). The goal of this attribute is to help Clang/LLVM answer `__builtin_object_size(Ptr, Type)` calls when the object pointed to by Ptr isn't visible in the caller of __builtin_object_size.</div><div><br></div><div>An example of its use:</div><div>#define CS(N) __attribute__((carry_size(N)))</div><div>void __attribute__((noinline)) Func(void *const p CS(0)) {</div><div>  printf("%d\n", __builtin_object_size(p, 0));</div><div>} </div><div><br></div><div>int main() {</div><div>  char c[10];</div><div>  Func(c); // prints "10\n"</div><div>}</div><div><br></div><div>For more info, please see the doc here: <a href="https://docs.google.com/document/d/14TwNLxFL_jhiYn7_kppNUDiaTopRAIY5bc-B8NcnKMM/edit?usp=sharing">https://docs.google.com/document/d/14TwNLxFL_jhiYn7_kppNUDiaTopRAIY5bc-B8NcnKMM/edit?usp=sharing</a></div><div><br></div><div>Thanks!</div><div>George</div></div>