[clang] [llvm] [Clang] Fix definition of layout-compatible to ignore empty classes (PR #92103)

2024-07-08 Thread Mital Ashok via cfe-commits
MitalAshok wrote: Ping https://github.com/llvm/llvm-project/pull/92103 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Clang] Fix definition of layout-compatible to ignore empty classes (PR #92103)

2024-06-22 Thread Mital Ashok via cfe-commits
MitalAshok wrote: https://github.com/llvm/llvm-project/blob/b0ae923ada836fa2c9114ac2c5afb39466f49fe0/clang/docs/ReleaseNotes.rst#L210-L212 Should be enough for ReleaseNotes, since not much has changed since Clang 18 https://github.com/llvm/llvm-project/pull/92103

[clang] [llvm] [Clang] Fix definition of layout-compatible to ignore empty classes (PR #92103)

2024-06-22 Thread Mital Ashok via cfe-commits
https://github.com/MitalAshok updated https://github.com/llvm/llvm-project/pull/92103 >From 5908130604728b9aa9b70eeb2523d368df08e68d Mon Sep 17 00:00:00 2001 From: Mital Ashok Date: Tue, 14 May 2024 08:28:19 +0100 Subject: [PATCH 1/4] [Clang] Fix definition of layout-compatible to ignore

[clang] [llvm] [Clang] Fix definition of layout-compatible to ignore empty classes (PR #92103)

2024-05-29 Thread John McCall via cfe-commits
rjmccall wrote: Changing a type trait is generally always an ABI problem, but yeah, if this hasn't been released yet, we're still free to fix basic bugs. https://github.com/llvm/llvm-project/pull/92103 ___ cfe-commits mailing list

[clang] [llvm] [Clang] Fix definition of layout-compatible to ignore empty classes (PR #92103)

2024-05-29 Thread David Blaikie via cfe-commits
dwblaikie wrote: Ah, OK - guess this might not be an ABI issue, then - carry on :) (I'll leave it to other Clang-y folks to do the rest of the review, the ABI issues were my only concern) https://github.com/llvm/llvm-project/pull/92103 ___

[clang] [llvm] [Clang] Fix definition of layout-compatible to ignore empty classes (PR #92103)

2024-05-28 Thread Mital Ashok via cfe-commits
MitalAshok wrote: Clang only uses `Sema::isLayoutCompatible` in two places: to implement `__is_layout_compatible` and [Clang type safety checking attributes](https://clang.llvm.org/docs/AttributeReference.html#type-safety-checking), which warn if a pointer does not point to a layout

[clang] [llvm] [Clang] Fix definition of layout-compatible to ignore empty classes (PR #92103)

2024-05-28 Thread David Blaikie via cfe-commits
dwblaikie wrote: > @dwblaikie This patch will bring Clang in line with GCC and MSVC: > https://godbolt.org/z/nj715zbsW would the change be ABI incompatible with previous versions of clang? If so, then it'll need to be versioned in Clang's ClangABI handling, so that platforms (like Sony's

[clang] [llvm] [Clang] Fix definition of layout-compatible to ignore empty classes (PR #92103)

2024-05-21 Thread Mital Ashok via cfe-commits
https://github.com/MitalAshok updated https://github.com/llvm/llvm-project/pull/92103 >From 5908130604728b9aa9b70eeb2523d368df08e68d Mon Sep 17 00:00:00 2001 From: Mital Ashok Date: Tue, 14 May 2024 08:28:19 +0100 Subject: [PATCH 1/3] [Clang] Fix definition of layout-compatible to ignore

[clang] [llvm] [Clang] Fix definition of layout-compatible to ignore empty classes (PR #92103)

2024-05-21 Thread Mital Ashok via cfe-commits
@@ -561,6 +561,42 @@ void CXXRecordDecl::addedClassSubobject(CXXRecordDecl *Subobj) { data().StructuralIfLiteral = false; } +const CXXRecordDecl *CXXRecordDecl::getStandardLayoutBaseWithFields() const { +#ifndef NDEBUG + { +assert( +isStandardLayout() && +

[clang] [llvm] [Clang] Fix definition of layout-compatible to ignore empty classes (PR #92103)

2024-05-21 Thread Mital Ashok via cfe-commits
MitalAshok wrote: @dwblaikie This patch will bring Clang in line with GCC and MSVC: https://godbolt.org/z/nj715zbsW https://github.com/llvm/llvm-project/pull/92103 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [llvm] [Clang] Fix definition of layout-compatible to ignore empty classes (PR #92103)

2024-05-21 Thread Vlad Serebrennikov via cfe-commits
@@ -561,6 +561,42 @@ void CXXRecordDecl::addedClassSubobject(CXXRecordDecl *Subobj) { data().StructuralIfLiteral = false; } +const CXXRecordDecl *CXXRecordDecl::getStandardLayoutBaseWithFields() const { +#ifndef NDEBUG + { +assert( +isStandardLayout() && +

[clang] [llvm] [Clang] Fix definition of layout-compatible to ignore empty classes (PR #92103)

2024-05-21 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll commented: Thank you for working on this! https://github.com/llvm/llvm-project/pull/92103 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Clang] Fix definition of layout-compatible to ignore empty classes (PR #92103)

2024-05-21 Thread Vlad Serebrennikov via cfe-commits
@@ -561,6 +561,42 @@ void CXXRecordDecl::addedClassSubobject(CXXRecordDecl *Subobj) { data().StructuralIfLiteral = false; } +const CXXRecordDecl *CXXRecordDecl::getStandardLayoutBaseWithFields() const { +#ifndef NDEBUG Endilll wrote: We have

[clang] [llvm] [Clang] Fix definition of layout-compatible to ignore empty classes (PR #92103)

2024-05-21 Thread Vlad Serebrennikov via cfe-commits
@@ -561,6 +561,42 @@ void CXXRecordDecl::addedClassSubobject(CXXRecordDecl *Subobj) { data().StructuralIfLiteral = false; } +const CXXRecordDecl *CXXRecordDecl::getStandardLayoutBaseWithFields() const { +#ifndef NDEBUG + { +assert( +isStandardLayout() && +

[clang] [llvm] [Clang] Fix definition of layout-compatible to ignore empty classes (PR #92103)

2024-05-21 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll edited https://github.com/llvm/llvm-project/pull/92103 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Clang] Fix definition of layout-compatible to ignore empty classes (PR #92103)

2024-05-20 Thread David Blaikie via cfe-commits
dwblaikie wrote: How's this compare with other implementations clang is trying to be compatible with (gcc (in the normal clang driver mode) and msvc (in clang-cl mode))? Would this be an ABI break against them, or is this intended as an ABI fix to align better with them? Or some third option?

[clang] [llvm] [Clang] Fix definition of layout-compatible to ignore empty classes (PR #92103)

2024-05-14 Thread Mital Ashok via cfe-commits
https://github.com/MitalAshok updated https://github.com/llvm/llvm-project/pull/92103 >From 5908130604728b9aa9b70eeb2523d368df08e68d Mon Sep 17 00:00:00 2001 From: Mital Ashok Date: Tue, 14 May 2024 08:28:19 +0100 Subject: [PATCH] [Clang] Fix definition of layout-compatible to ignore empty

[clang] [llvm] [Clang] Fix definition of layout-compatible to ignore empty classes (PR #92103)

2024-05-14 Thread Mital Ashok via cfe-commits
https://github.com/MitalAshok updated https://github.com/llvm/llvm-project/pull/92103 >From 74e133215e7ba9049fb021eb9bbb130347496503 Mon Sep 17 00:00:00 2001 From: Mital Ashok Date: Tue, 14 May 2024 08:28:19 +0100 Subject: [PATCH] [Clang] Fix definition of layout-compatible to ignore empty

[clang] [llvm] [Clang] Fix definition of layout-compatible to ignore empty classes (PR #92103)

2024-05-14 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Mital Ashok (MitalAshok) Changes Also changes the behaviour of `__builtin_is_layout_compatible` None of the historic nor the current definition of layout-compatible classes mention anything about base classes (other than implicitly

[clang] [llvm] [Clang] Fix definition of layout-compatible to ignore empty classes (PR #92103)

2024-05-14 Thread Mital Ashok via cfe-commits
https://github.com/MitalAshok created https://github.com/llvm/llvm-project/pull/92103 Also changes the behaviour of `__builtin_is_layout_compatible` None of the historic nor the current definition of layout-compatible classes mention anything about base classes (other than implicitly through