[clang] [clang] Fix PointerAuth semantics of cpp_trivially_relocatable (PR #143796)

2025-06-12 Thread Oliver Hunt via cfe-commits
https://github.com/ojhunt closed https://github.com/llvm/llvm-project/pull/143796 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Fix PointerAuth semantics of cpp_trivially_relocatable (PR #143796)

2025-06-12 Thread Oliver Hunt via cfe-commits
ojhunt wrote: Closing this PR because there's a lot of noise in it that is just completely reverted/gone at this point. https://github.com/llvm/llvm-project/pull/143796 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi

[clang] [clang] Fix PointerAuth semantics of cpp_trivially_relocatable (PR #143796)

2025-06-12 Thread Oliver Hunt via cfe-commits
@@ -292,77 +294,129 @@ Sema::CheckCXX2CRelocatableAndReplaceable(const CXXRecordDecl *D) { return HasSuitableSMP(); // is a union with no user-declared special member functions, or -if (IsUnion()) +if (IsTrivialUnion()) return HasSuitableSMP();

[clang] [clang] Fix PointerAuth semantics of cpp_trivially_relocatable (PR #143796)

2025-06-12 Thread Corentin Jabot via cfe-commits
@@ -1698,13 +1698,47 @@ ASTContext::getRelocationInfoForCXXRecord(const CXXRecordDecl *RD) const { } void ASTContext::setRelocationInfoForCXXRecord( -const CXXRecordDecl *RD, CXXRecordDeclRelocationInfo Info) { +const CXXRecordDecl *RD, const CXXRecordDeclRelocationIn

[clang] [clang] Fix PointerAuth semantics of cpp_trivially_relocatable (PR #143796)

2025-06-12 Thread Corentin Jabot via cfe-commits
@@ -292,77 +294,129 @@ Sema::CheckCXX2CRelocatableAndReplaceable(const CXXRecordDecl *D) { return HasSuitableSMP(); // is a union with no user-declared special member functions, or -if (IsUnion()) +if (IsTrivialUnion()) return HasSuitableSMP();

[clang] [clang] Fix PointerAuth semantics of cpp_trivially_relocatable (PR #143796)

2025-06-12 Thread Oliver Hunt via cfe-commits
@@ -292,77 +294,129 @@ Sema::CheckCXX2CRelocatableAndReplaceable(const CXXRecordDecl *D) { return HasSuitableSMP(); // is a union with no user-declared special member functions, or -if (IsUnion()) +if (IsTrivialUnion()) return HasSuitableSMP();

[clang] [clang] Fix PointerAuth semantics of cpp_trivially_relocatable (PR #143796)

2025-06-12 Thread Oliver Hunt via cfe-commits
@@ -10615,7 +10615,7 @@ void Sema::checkIllFormedTrivialABIStruct(CXXRecordDecl &RD) { } } - if (IsCXXTriviallyRelocatableType(RD)) + if (CheckCXX2CRelocatableAndReplaceable(&RD).IsRelocatable) ojhunt wrote: I think I did restore it for QualType an

[clang] [clang] Fix PointerAuth semantics of cpp_trivially_relocatable (PR #143796)

2025-06-12 Thread Oliver Hunt via cfe-commits
@@ -621,17 +621,24 @@ class ASTContext : public RefCountedBase { public: struct CXXRecordDeclRelocationInfo { +static CXXRecordDeclRelocationInfo NonRelocatable() { + return {false, false}; +} + unsigned IsRelocatable; unsigned IsReplaceable; -

[clang] [clang] Fix PointerAuth semantics of cpp_trivially_relocatable (PR #143796)

2025-06-12 Thread Corentin Jabot via cfe-commits
@@ -621,17 +621,24 @@ class ASTContext : public RefCountedBase { public: struct CXXRecordDeclRelocationInfo { +static CXXRecordDeclRelocationInfo NonRelocatable() { + return {false, false}; +} + unsigned IsRelocatable; unsigned IsReplaceable; -

[clang] [clang] Fix PointerAuth semantics of cpp_trivially_relocatable (PR #143796)

2025-06-12 Thread Corentin Jabot via cfe-commits
@@ -1698,13 +1698,47 @@ ASTContext::getRelocationInfoForCXXRecord(const CXXRecordDecl *RD) const { } void ASTContext::setRelocationInfoForCXXRecord( -const CXXRecordDecl *RD, CXXRecordDeclRelocationInfo Info) { +const CXXRecordDecl *RD, const CXXRecordDeclRelocationIn

[clang] [clang] Fix PointerAuth semantics of cpp_trivially_relocatable (PR #143796)

2025-06-12 Thread Corentin Jabot via cfe-commits
@@ -292,77 +294,129 @@ Sema::CheckCXX2CRelocatableAndReplaceable(const CXXRecordDecl *D) { return HasSuitableSMP(); // is a union with no user-declared special member functions, or -if (IsUnion()) +if (IsTrivialUnion()) return HasSuitableSMP();

[clang] [clang] Fix PointerAuth semantics of cpp_trivially_relocatable (PR #143796)

2025-06-12 Thread Corentin Jabot via cfe-commits
@@ -1698,13 +1698,47 @@ ASTContext::getRelocationInfoForCXXRecord(const CXXRecordDecl *RD) const { } void ASTContext::setRelocationInfoForCXXRecord( -const CXXRecordDecl *RD, CXXRecordDeclRelocationInfo Info) { +const CXXRecordDecl *RD, const CXXRecordDeclRelocationIn

[clang] [clang] Fix PointerAuth semantics of cpp_trivially_relocatable (PR #143796)

2025-06-12 Thread Corentin Jabot via cfe-commits
@@ -10615,7 +10615,7 @@ void Sema::checkIllFormedTrivialABIStruct(CXXRecordDecl &RD) { } } - if (IsCXXTriviallyRelocatableType(RD)) + if (CheckCXX2CRelocatableAndReplaceable(&RD).IsRelocatable) cor3ntin wrote: I think we should keep that interface

[clang] [clang] Fix PointerAuth semantics of cpp_trivially_relocatable (PR #143796)

2025-06-11 Thread via cfe-commits
github-actions[bot] wrote: :warning: C/C++ code formatter, clang-format found issues in your code. :warning: You can test this locally with the following command: ``bash git-clang-format --diff HEAD~1 HEAD --extensions h,cpp -- clang/test/SemaCXX/trivially-relocatable-ptrauth.cp

[clang] [clang] Fix PointerAuth semantics of cpp_trivially_relocatable (PR #143796)

2025-06-11 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Oliver Hunt (ojhunt) Changes 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 al

[clang] [clang] Fix PointerAuth semantics of cpp_trivially_relocatable (PR #143796)

2025-06-11 Thread Oliver Hunt via cfe-commits
https://github.com/ojhunt created https://github.com/llvm/llvm-project/pull/143796 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