================
@@ -544,6 +544,7 @@ TYPE_TRAIT_2(__is_pointer_interconvertible_base_of, 
IsPointerInterconvertibleBas
 #include "clang/Basic/TransformTypeTraits.def"
 
 // Clang-only C++ Type Traits
+TYPE_TRAIT_1(__has_non_relocatable_fields, HasNonRelocatableFields, KEYCXX)
----------------
ojhunt wrote:

I do not like this -- there are existing functions for handling whether an 
object is trivially copying, relocatable, etc that should just be updated to 
correctly report the traits of impacted types. See the various Sema functions 
querying `isAddressDiscriminated()`. That function currently only cares about 
pointer auth, but it would not be unreasonable to have it consider other 
properties, like PDP.

In fact a lot of the behavior you're wanting in this feature is essentially 
covered by the PointerAuthQualfier. It would perhaps be reasonable to 
generalize that to something akin to SecurePointerQualifier that could be 
either a PAQ or PFP qualifier. Then most of the current semantic queries made 
to support pointer auth could just be a single shared implementation.

https://github.com/llvm/llvm-project/pull/133538
_______________________________________________
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

Reply via email to