[all-commits] [llvm/llvm-project] 406527: [clang] Fix PointerAuth semantics of __builtin_is_...

Oliver Hunt via All-commits all-commits at lists.llvm.org
Wed Jun 11 15:17:11 PDT 2025


  Branch: refs/heads/users/ojhunt/ptrauth-vs-trivial-relocation-sema
  Home:   https://github.com/llvm/llvm-project
  Commit: 4065271030ae410c4a49fd48f6fe2f2a669f9ae5
      https://github.com/llvm/llvm-project/commit/4065271030ae410c4a49fd48f6fe2f2a669f9ae5
  Author: Oliver Hunt <oliver at apple.com>
  Date:   2025-06-11 (Wed, 11 Jun 2025)

  Changed paths:
    M clang/include/clang/AST/ASTContext.h
    M clang/include/clang/Sema/Sema.h
    M clang/lib/AST/ASTContext.cpp
    M clang/lib/Sema/SemaDeclCXX.cpp
    M clang/lib/Sema/SemaTypeTraits.cpp
    M clang/test/SemaCXX/cxx2c-trivially-relocatable.cpp
    M clang/test/SemaCXX/ptrauth-triviality.cpp
    A clang/test/SemaCXX/trivially-relocatable-ptrauth.cpp

  Log Message:
  -----------
  [clang] Fix PointerAuth semantics of __builtin_is_cpp_trivially_relocatable

This reworks the way we compute relocatability and replaceability of
types. We do this by having a single interface the provides a full
`TypeRelocationInfo` for a QualType. This simplifies the reasoning
for all cases, and reduces duplication of code.

We still limit our caching of results to CXXRecordDecls but i think
it might be worth caching on canonical types in future, but for now
I didn't want to change the caching semantics any further.

TypeRelocationInfo no longer permits raw field access as we can then
ensure we maintain correct state over pointer auth and similar.

As a basic optimization we gate the additional required work on the
existence pointer auth options.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list