[clang] [clang][PAC] Fix builtins that claim address discriminated types are bitwise compatible (PR #154490)
John McCall via cfe-commits
cfe-commits at lists.llvm.org
Fri Aug 22 14:04:29 PDT 2025
================
@@ -74,7 +74,7 @@ static_assert(__is_trivially_destructible(S3));
static_assert(!__is_trivially_copyable(S3));
static_assert(!__is_trivially_relocatable(S3)); // expected-warning{{deprecated}}
//FIXME
-static_assert(__builtin_is_cpp_trivially_relocatable(S3));
+static_assert(!__builtin_is_cpp_trivially_relocatable(S3));
----------------
rjmccall wrote:
I see. The idea is that it should work, and while we don't support it today, we do intend to in the future? That seems reasonable.
Wait, trivial relocation of a polymorphic object just copies the v-table pointers? That seems obviously incorrect unless there's some semantic reason relocation can only happen on complete objects.
https://github.com/llvm/llvm-project/pull/154490
More information about the cfe-commits
mailing list