[clang] [clang] Fix behavior of `__is_trivially_relocatable(volatile int)` (PR #77092)

2024-03-10 Thread via cfe-commits
https://github.com/cor3ntin closed https://github.com/llvm/llvm-project/pull/77092 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Fix behavior of `__is_trivially_relocatable(volatile int)` (PR #77092)

2024-03-10 Thread via cfe-commits
https://github.com/cor3ntin approved this pull request. https://github.com/llvm/llvm-project/pull/77092 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Fix behavior of `__is_trivially_relocatable(volatile int)` (PR #77092)

2024-03-10 Thread Amirreza Ashouri via cfe-commits
https://github.com/AMP999 updated https://github.com/llvm/llvm-project/pull/77092 >From ed94371b8e2293642731b72948883c2ec20bd09d Mon Sep 17 00:00:00 2001 From: Amirreza Ashouri Date: Wed, 3 Jan 2024 23:23:14 +0330 Subject: [PATCH 1/4] [clang] Fix behavior of

[clang] [clang] Fix behavior of `__is_trivially_relocatable(volatile int)` (PR #77092)

2024-03-10 Thread Amirreza Ashouri via cfe-commits
@@ -249,6 +249,12 @@ Bug Fixes in This Version - Clang now doesn't produce false-positive warning `-Wconstant-logical-operand` for logical operators in C23. + Fixes (`#64356 `_). +- ``__is_trivially_relocatable`` no longer

[clang] [clang] Fix behavior of `__is_trivially_relocatable(volatile int)` (PR #77092)

2024-03-10 Thread Amirreza Ashouri via cfe-commits
https://github.com/AMP999 updated https://github.com/llvm/llvm-project/pull/77092 >From ed94371b8e2293642731b72948883c2ec20bd09d Mon Sep 17 00:00:00 2001 From: Amirreza Ashouri Date: Wed, 3 Jan 2024 23:23:14 +0330 Subject: [PATCH 1/3] [clang] Fix behavior of

[clang] [clang] Fix behavior of `__is_trivially_relocatable(volatile int)` (PR #77092)

2024-03-10 Thread via cfe-commits
https://github.com/cor3ntin edited https://github.com/llvm/llvm-project/pull/77092 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Fix behavior of `__is_trivially_relocatable(volatile int)` (PR #77092)

2024-03-10 Thread via cfe-commits
@@ -249,6 +249,12 @@ Bug Fixes in This Version - Clang now doesn't produce false-positive warning `-Wconstant-logical-operand` for logical operators in C23. + Fixes (`#64356 `_). +- ``__is_trivially_relocatable`` no longer

[clang] [clang] Fix behavior of `__is_trivially_relocatable(volatile int)` (PR #77092)

2024-03-09 Thread Amirreza Ashouri via cfe-commits
https://github.com/AMP999 updated https://github.com/llvm/llvm-project/pull/77092 >From ed94371b8e2293642731b72948883c2ec20bd09d Mon Sep 17 00:00:00 2001 From: Amirreza Ashouri Date: Wed, 3 Jan 2024 23:23:14 +0330 Subject: [PATCH 1/2] [clang] Fix behavior of

[clang] [clang] Fix behavior of `__is_trivially_relocatable(volatile int)` (PR #77092)

2024-03-09 Thread Amirreza Ashouri via cfe-commits
AMP999 wrote: @mordante Thank you! I've resolved merge conflicts. I've also added an NFC commit to remove empty messages from `static_assert`s for consistency with the rest of the file. https://github.com/llvm/llvm-project/pull/77092 ___ cfe-commits

[clang] [clang] Fix behavior of `__is_trivially_relocatable(volatile int)` (PR #77092)

2024-03-09 Thread Amirreza Ashouri via cfe-commits
https://github.com/AMP999 updated https://github.com/llvm/llvm-project/pull/77092 >From ed94371b8e2293642731b72948883c2ec20bd09d Mon Sep 17 00:00:00 2001 From: Amirreza Ashouri Date: Wed, 3 Jan 2024 23:23:14 +0330 Subject: [PATCH 1/2] [clang] Fix behavior of

[clang] [clang] Fix behavior of `__is_trivially_relocatable(volatile int)` (PR #77092)

2024-03-09 Thread Mark de Wever via cfe-commits
mordante wrote: @AMP999 I wanted to merge this for you but there are merge conflicts. Can you resolve these? https://github.com/llvm/llvm-project/pull/77092 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [clang] Fix behavior of `__is_trivially_relocatable(volatile int)` (PR #77092)

2024-02-14 Thread Amirreza Ashouri via cfe-commits
AMP999 wrote: Thanks all for the review! @AaronBallman, Could you please land this patch for me? https://github.com/llvm/llvm-project/pull/77092 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [clang] Fix behavior of `__is_trivially_relocatable(volatile int)` (PR #77092)

2024-02-12 Thread Amirreza Ashouri via cfe-commits
https://github.com/AMP999 updated https://github.com/llvm/llvm-project/pull/77092 >From ed94371b8e2293642731b72948883c2ec20bd09d Mon Sep 17 00:00:00 2001 From: Amirreza Ashouri Date: Wed, 3 Jan 2024 23:23:14 +0330 Subject: [PATCH] [clang] Fix behavior of __is_trivially_relocatable(volatile

[clang] [clang] Fix behavior of `__is_trivially_relocatable(volatile int)` (PR #77092)

2024-02-12 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/77092 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Fix behavior of `__is_trivially_relocatable(volatile int)` (PR #77092)

2024-02-12 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > This isn't ABI breaking for us currently (at least in a non-benign way). We > only use it to optimize `vector` growing currently, and just define it to > `is_trivially_copyable` if `__is_trivially_relocatable` isn't available. Excellent, thank you for the confirmation!

[clang] [clang] Fix behavior of `__is_trivially_relocatable(volatile int)` (PR #77092)

2024-02-12 Thread Nikolas Klauser via cfe-commits
philnik777 wrote: This isn't ABI breaking for us currently (at least in a non-benign way). We only use it to optimize `vector` growing currently, and just define it to `is_trivially_copyable` if `__is_trivially_relocatable` isn't available. https://github.com/llvm/llvm-project/pull/77092

[clang] [clang] Fix behavior of `__is_trivially_relocatable(volatile int)` (PR #77092)

2024-02-12 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman commented: I think the changes make sense in as much as relocatable is supposed to be a subset of copyable (I continue to think `volatile`-qualified objects should not be trivially copyable... because they aren't... but that's WG21's issue, not ours). I'm

[clang] [clang] Fix behavior of `__is_trivially_relocatable(volatile int)` (PR #77092)

2024-02-11 Thread Amirreza Ashouri via cfe-commits
AMP999 wrote: @AaronBallman, does this look okay to you? See https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2023/p1144r9.html#abstract-opdef-trivially-relocatable and https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2023/p2786r3.pdf#subsection.12.4 which both agree on this point.

[clang] [clang] Fix behavior of `__is_trivially_relocatable(volatile int)` (PR #77092)

2024-01-22 Thread Amirreza Ashouri via cfe-commits
AMP999 wrote: > I don't have a good idea here... I don't really know what it means to > 'relocate' a volatile. This PR doesn't take a position on what it means to relocate a volatile; it just makes the type-trait return the correct value on cv-qualified types, for consistency with

[clang] [clang] Fix behavior of `__is_trivially_relocatable(volatile int)` (PR #77092)

2024-01-22 Thread Erich Keane via cfe-commits
https://github.com/erichkeane commented: I don't have a good idea here... I don't really know what it means to 'relocate' a volatile. https://github.com/llvm/llvm-project/pull/77092 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [clang] Fix behavior of `__is_trivially_relocatable(volatile int)` (PR #77092)

2024-01-21 Thread via cfe-commits
cor3ntin wrote: @AaronBallman @erichkeane ping :) https://github.com/llvm/llvm-project/pull/77092 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Fix behavior of `__is_trivially_relocatable(volatile int)` (PR #77092)

2024-01-19 Thread Amirreza Ashouri via cfe-commits
@@ -2669,6 +2669,8 @@ bool QualType::isTriviallyRelocatableType(const ASTContext ) const { return false; } else if (const auto *RD = BaseElementType->getAsRecordDecl()) { return RD->canPassInRegisters(); + } else if

[clang] [clang] Fix behavior of `__is_trivially_relocatable(volatile int)` (PR #77092)

2024-01-12 Thread John McCall via cfe-commits
@@ -2669,6 +2669,8 @@ bool QualType::isTriviallyRelocatableType(const ASTContext ) const { return false; } else if (const auto *RD = BaseElementType->getAsRecordDecl()) { return RD->canPassInRegisters(); + } else if

[clang] [clang] Fix behavior of `__is_trivially_relocatable(volatile int)` (PR #77092)

2024-01-10 Thread Amirreza Ashouri via cfe-commits
https://github.com/AMP999 updated https://github.com/llvm/llvm-project/pull/77092 >From 5d8204ef66bea614d614b5c16a2ddf765402f710 Mon Sep 17 00:00:00 2001 From: Amirreza Ashouri Date: Wed, 3 Jan 2024 23:23:14 +0330 Subject: [PATCH] [clang] Fix behavior of __is_trivially_relocatable(volatile

[clang] [clang] Fix behavior of `__is_trivially_relocatable(volatile int)` (PR #77092)

2024-01-10 Thread via cfe-commits
cor3ntin wrote: @erichkeane @AaronBallman https://github.com/llvm/llvm-project/pull/77092 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Fix behavior of `__is_trivially_relocatable(volatile int)` (PR #77092)

2024-01-06 Thread Amirreza Ashouri via cfe-commits
AMP999 wrote: > I think I would like some more eyes on this, I don't know if it is obvious to > me what it means to reallocate a volatile object. "Both active [wg21.link/p1144](https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2023/p1144r9.html) and

[clang] [clang] Fix behavior of `__is_trivially_relocatable(volatile int)` (PR #77092)

2024-01-05 Thread Shafik Yaghmour via cfe-commits
shafik wrote: I think I would like some more eyes on this, I don't know if it is obvious to me what it means to reallocate a volatile object. https://github.com/llvm/llvm-project/pull/77092 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [clang] Fix behavior of `__is_trivially_relocatable(volatile int)` (PR #77092)

2024-01-05 Thread via cfe-commits
https://github.com/cor3ntin approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/77092 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Fix behavior of `__is_trivially_relocatable(volatile int)` (PR #77092)

2024-01-05 Thread Amirreza Ashouri via cfe-commits
https://github.com/AMP999 updated https://github.com/llvm/llvm-project/pull/77092 >From fd01df837e8d2ae543b35e9075297db36599e179 Mon Sep 17 00:00:00 2001 From: Amirreza Ashouri Date: Wed, 3 Jan 2024 23:23:14 +0330 Subject: [PATCH] [clang] Fix behavior of __is_trivially_relocatable(volatile

[clang] [clang] Fix behavior of `__is_trivially_relocatable(volatile int)` (PR #77092)

2024-01-05 Thread Amirreza Ashouri via cfe-commits
https://github.com/AMP999 updated https://github.com/llvm/llvm-project/pull/77092 >From e9339f02ae0ed9411cf01828dd55e566c8852ec1 Mon Sep 17 00:00:00 2001 From: Amirreza Ashouri Date: Wed, 3 Jan 2024 23:23:14 +0330 Subject: [PATCH] [clang] Fix behavior of __is_trivially_relocatable(volatile

[clang] [clang] Fix behavior of `__is_trivially_relocatable(volatile int)` (PR #77092)

2024-01-05 Thread Amirreza Ashouri via cfe-commits
https://github.com/AMP999 updated https://github.com/llvm/llvm-project/pull/77092 >From b13a2802ecbb8f8b9cb3771769895e069b869a81 Mon Sep 17 00:00:00 2001 From: Amirreza Ashouri Date: Wed, 3 Jan 2024 23:23:14 +0330 Subject: [PATCH] [clang] Fix behavior of __is_trivially_relocatable(volatile

[clang] [clang] Fix behavior of `__is_trivially_relocatable(volatile int)` (PR #77092)

2024-01-05 Thread Amirreza Ashouri via cfe-commits
AMP999 wrote: > We probably need a release note for that, don't we? LGTM otherwise Sure, I'll add a release note to Clang. https://github.com/llvm/llvm-project/pull/77092 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [clang] Fix behavior of `__is_trivially_relocatable(volatile int)` (PR #77092)

2024-01-05 Thread via cfe-commits
cor3ntin wrote: We probably need a release note for that, don't we? LGTM otherwise https://github.com/llvm/llvm-project/pull/77092 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Fix behavior of `__is_trivially_relocatable(volatile int)` (PR #77092)

2024-01-05 Thread Amirreza Ashouri via cfe-commits
@@ -2651,6 +2651,8 @@ bool QualType::isTriviallyRelocatableType(const ASTContext ) const { return false; } else if (!BaseElementType->isObjectType()) { return false; + } else if (BaseElementType.isTriviallyCopyableType(Context)) { +return true;

[clang] [clang] Fix behavior of `__is_trivially_relocatable(volatile int)` (PR #77092)

2024-01-05 Thread Amirreza Ashouri via cfe-commits
https://github.com/AMP999 updated https://github.com/llvm/llvm-project/pull/77092 >From 7f590147964cf61f67c0d0a250b1a41211b29585 Mon Sep 17 00:00:00 2001 From: Amirreza Ashouri Date: Wed, 3 Jan 2024 23:23:14 +0330 Subject: [PATCH] [clang] Fix behavior of __is_trivially_relocatable(volatile

[clang] [clang] Fix behavior of `__is_trivially_relocatable(volatile int)` (PR #77092)

2024-01-05 Thread via cfe-commits
@@ -2651,6 +2651,8 @@ bool QualType::isTriviallyRelocatableType(const ASTContext ) const { return false; } else if (!BaseElementType->isObjectType()) { return false; + } else if (BaseElementType.isTriviallyCopyableType(Context)) { +return true;

[clang] [clang] Fix behavior of `__is_trivially_relocatable(volatile int)` (PR #77092)

2024-01-05 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Amirreza Ashouri (AMP999) Changes Consistent with `__is_trivially_copyable(volatile int) == true` and `__is_trivially_relocatable(volatile Trivial) == true`, `__is_trivially_relocatable(volatile int)` should also be `true`. Fixes

[clang] [clang] Fix behavior of `__is_trivially_relocatable(volatile int)` (PR #77092)

2024-01-05 Thread Amirreza Ashouri via cfe-commits
https://github.com/AMP999 created https://github.com/llvm/llvm-project/pull/77092 Consistent with `__is_trivially_copyable(volatile int) == true` and `__is_trivially_relocatable(volatile Trivial) == true`, `__is_trivially_relocatable(volatile int)` should also be `true`. Fixes