ojhunt wrote: > Perhaps silly initial question: why do we need a whole different qualifier > for this? Why can you not write `__ptrauth uintptr_t foo`?
Not a silly question, back when first implemented we spent time thinking about this. The concern was basically `T* __ptrauth(...)` can represent all valid pointers, but `[u]intptr_t __ptrauth(...)` cannot represent all possible integers, so we wanted the spelling to be very clear that this is not really an int so making the annotation clear that it restricts what the int can do seemed valuable. There's also the hypothetical hazard of `SomeTemplateParam __ptrauth(...)` unexpectedly applying to an integer type so the spelling difference is a hazard protection there. https://github.com/llvm/llvm-project/pull/137580 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits