AaronBallman wrote:

Thank you for your patience!

In general, I think adding a new qualifier to Clang needs to come with 
significant justification for the implementation and maintenance costs. In this 
specific case, those costs are somewhat amortized because we already have the 
`__ptrauth` qualifier and this piggybacks off that work. But I don't think the 
benefits justify the costs: if the user writes `__ptrauth` on an integer type, 
we can determine whether that type is "good enough" or not and issue a 
diagnostic for invalid or suspicious uses, same as if the user spelled it 
`__ptrauth_restricted_intptr`. The implementation already has to update 
typechecking in various places regardless of which way we spell the qualifiers, 
so there should not be too much extra implementation burden from only using one 
qualifier.

So on balance, I think we should only upstream the single qualifier and use a 
header file + feature tests for compatibility with older compilers. Is that 
something you can get behind? (You're still the expert in this space, so if I'm 
trivializing concerns, please speak up!)

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

Reply via email to