[clang] [Clang] Fix __is_trivially_equality_comparable returning true with ineligebile defaulted overloads (PR #93113)

2024-06-13 Thread Amirreza Ashouri via cfe-commits
AMP999 wrote: LGTM now, for what it's worth. https://github.com/llvm/llvm-project/pull/93113 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang]Add additional test coverage for `__is_trivially_relocatable(T)` (PR #91412)

2024-06-09 Thread Amirreza Ashouri via cfe-commits
AMP999 wrote: ping @corentin @shafik can you help me land this additional test coverage? It doesn't change any behavior, just documents the behavior we currently have. https://github.com/llvm/llvm-project/pull/91412 ___ cfe-commits mailing list

[clang] [clang]Add additional test coverage for `__is_trivially_relocatable(T)` (PR #91412)

2024-06-09 Thread Amirreza Ashouri via cfe-commits
https://github.com/AMP999 updated https://github.com/llvm/llvm-project/pull/91412 >From 532e1c6976a1cb2abf897d0a9312813f2f1d13f1 Mon Sep 17 00:00:00 2001 From: Amirreza Ashouri Date: Wed, 8 May 2024 03:09:38 +0330 Subject: [PATCH] [clang] [test] Add additional test coverage for

[clang] Sema: Fix CXXRecordDecl::isTriviallyCopyable() for classes with all deleted special functions. (PR #94831)

2024-06-08 Thread Amirreza Ashouri via cfe-commits
AMP999 wrote: You're currently checking whether there is at least one **deleted** member of **each** kind; but you should be checking whether there is at least one **non-deleted** member of **any** kind. A type that shows the difference is: ``` struct S { S(const S&) = default; S(S&) =

[clang] [Clang] Fix __is_trivially_equality_comparable returning true with ineligebile defaulted overloads (PR #93113)

2024-05-23 Thread Amirreza Ashouri via cfe-commits
AMP999 wrote: This patch seems to break the following example (works in trunk, breaks after this patch). Could you please add a test case for this? https://godbolt.org/z/rdn74xn9M ``` struct S { bool operator==(const S&) const = default; }; struct Derived : S { int j_ = 0; };

[clang] [Clang] Fix __is_trivially_equality_comparable returning true with ineligebile defaulted overloads (PR #93113)

2024-05-23 Thread Amirreza Ashouri via cfe-commits
AMP999 wrote: Could you explain a bit about why we check `Decl->isTriviallyCopyable()` here? https://github.com/llvm/llvm-project/pull/93113 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [clang]Add additional test coverage for `__is_trivially_relocatable(T)` (PR #91412)

2024-05-07 Thread Amirreza Ashouri via cfe-commits
https://github.com/AMP999 created https://github.com/llvm/llvm-project/pull/91412 None >From 541910fc90064e5491622245d9e94759cffa4d15 Mon Sep 17 00:00:00 2001 From: Amirreza Ashouri Date: Wed, 8 May 2024 03:09:38 +0330 Subject: [PATCH] [clang]Add additional test coverage for

[clang] [clang]Treat arguments to builtin type traits as template type arguments (PR #87132)

2024-04-17 Thread Amirreza Ashouri via cfe-commits
AMP999 wrote: @cor3ntin Thank you! I don't have the permission to merge. Could you merge it for me? https://github.com/llvm/llvm-project/pull/87132 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [clang][Sema] Track trivial-relocatability as a type trait (PR #84621)

2024-04-16 Thread Amirreza Ashouri via cfe-commits
AMP999 wrote: > We (users & implementers) have all collectively identified trivial > relocatability as an important optimization for vector-like containers, and > we're all looking for a solution to that. It feels like this attempt to > standardize this type trait is getting in the way of our

[clang] [clang]Treat arguments to builtin type traits as template type arguments (PR #87132)

2024-04-09 Thread Amirreza Ashouri via cfe-commits
AMP999 wrote: @shafik, gentle ping! https://github.com/llvm/llvm-project/pull/87132 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang]Treat arguments to builtin type traits as template type arguments (PR #87132)

2024-04-08 Thread Amirreza Ashouri via cfe-commits
AMP999 wrote: @fahadnayyar, does this PR address llvm#86997? https://github.com/llvm/llvm-project/pull/87132 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang]Treat arguments to builtin type traits as template type arguments (PR #87132)

2024-03-29 Thread Amirreza Ashouri via cfe-commits
https://github.com/AMP999 created https://github.com/llvm/llvm-project/pull/87132 This change improves error messages for builtins in case of empty parentheses. Fixes llvm#86997 >From f8cc36bd3706cc5744eb3223b0c32df2f6f871f9 Mon Sep 17 00:00:00 2001 From: Amirreza Ashouri Date: Fri, 29 Mar

[clang] [clang] Support `__is_trivially_copyable(int()&)==false` (PR #81298)

2024-03-29 Thread Amirreza Ashouri via cfe-commits
AMP999 wrote: I don't know, but it seems to me that ideally the `DSC` here would be `DSC_template_type_arg`, not just `DSC_template_arg`. Is there a way to make that happen? https://github.com/llvm/llvm-project/pull/81298 ___ cfe-commits mailing

[clang] [clang][Sema] Track trivial-relocatability as a type trait (PR #84621)

2024-03-17 Thread Amirreza Ashouri via cfe-commits
https://github.com/AMP999 updated https://github.com/llvm/llvm-project/pull/84621 >From 6e127e5794efafaabf82b6c3d5e0634ddcfee977 Mon Sep 17 00:00:00 2001 From: Amirreza Ashouri Date: Sat, 2 Mar 2024 15:37:33 +0330 Subject: [PATCH 1/5] [clang][Sema] Track trivial-relocatability as a type trait

[clang] [clang][Sema] Track trivial-relocatability as a type trait (PR #84621)

2024-03-17 Thread Amirreza Ashouri via cfe-commits
@@ -826,6 +842,14 @@ void CXXRecordDecl::addedMember(Decl *D) { ? !Constructor->isImplicit() : (Constructor->isUserProvided() || Constructor->isExplicit())) data().Aggregate = false; + + // A trivially relocatable class is a class: +

[clang] [clang][Sema] Track trivial-relocatability as a type trait (PR #84621)

2024-03-17 Thread Amirreza Ashouri via cfe-commits
https://github.com/AMP999 edited https://github.com/llvm/llvm-project/pull/84621 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Sema] Track trivial-relocatability as a type trait (PR #84621)

2024-03-17 Thread Amirreza Ashouri via cfe-commits
@@ -857,8 +881,13 @@ void CXXRecordDecl::addedMember(Decl *D) { data().HasDeclaredCopyAssignmentWithConstParam = true; } -if (Method->isMoveAssignmentOperator()) +if (Method->isMoveAssignmentOperator()) { SMKind |= SMF_MoveAssignment; +}

[clang] [clang][Sema] Track trivial-relocatability as a type trait (PR #84621)

2024-03-17 Thread Amirreza Ashouri via cfe-commits
https://github.com/AMP999 updated https://github.com/llvm/llvm-project/pull/84621 >From 6e127e5794efafaabf82b6c3d5e0634ddcfee977 Mon Sep 17 00:00:00 2001 From: Amirreza Ashouri Date: Sat, 2 Mar 2024 15:37:33 +0330 Subject: [PATCH 1/4] [clang][Sema] Track trivial-relocatability as a type trait

[clang] [clang][Sema] Track trivial-relocatability as a type trait (PR #84621)

2024-03-12 Thread Amirreza Ashouri via cfe-commits
https://github.com/AMP999 updated https://github.com/llvm/llvm-project/pull/84621 >From 6e127e5794efafaabf82b6c3d5e0634ddcfee977 Mon Sep 17 00:00:00 2001 From: Amirreza Ashouri Date: Sat, 2 Mar 2024 15:37:33 +0330 Subject: [PATCH 1/3] [clang][Sema] Track trivial-relocatability as a type trait

[clang] [clang][Sema] Track trivial-relocatability as a type trait (PR #84621)

2024-03-12 Thread Amirreza Ashouri via cfe-commits
https://github.com/AMP999 updated https://github.com/llvm/llvm-project/pull/84621 >From 6e127e5794efafaabf82b6c3d5e0634ddcfee977 Mon Sep 17 00:00:00 2001 From: Amirreza Ashouri Date: Sat, 2 Mar 2024 15:37:33 +0330 Subject: [PATCH 1/3] [clang][Sema] Track trivial-relocatability as a type trait

[clang] [clang][Sema] Track trivial-relocatability as a type trait (PR #84621)

2024-03-12 Thread Amirreza Ashouri via cfe-commits
https://github.com/AMP999 updated https://github.com/llvm/llvm-project/pull/84621 >From 6e127e5794efafaabf82b6c3d5e0634ddcfee977 Mon Sep 17 00:00:00 2001 From: Amirreza Ashouri Date: Sat, 2 Mar 2024 15:37:33 +0330 Subject: [PATCH 1/2] [clang][Sema] Track trivial-relocatability as a type trait

[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][Sema] Track trivial-relocatability as a type trait (PR #84621)

2024-03-09 Thread Amirreza Ashouri via cfe-commits
https://github.com/AMP999 updated https://github.com/llvm/llvm-project/pull/84621 >From 2603e170c127aa614d499e5d527db8503a55c651 Mon Sep 17 00:00:00 2001 From: Amirreza Ashouri Date: Sat, 2 Mar 2024 15:37:33 +0330 Subject: [PATCH] [clang][Sema] Track trivial-relocatability as a type trait To

[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] [NFC] Eliminate trailing white space causing CI build failure (PR #84632)

2024-03-09 Thread Amirreza Ashouri via cfe-commits
https://github.com/AMP999 created https://github.com/llvm/llvm-project/pull/84632 To resolve the following issue in the CI build: ``` *** Checking for trailing whitespace left in Clang source files *** + grep -rnI '[[:blank:]]$' clang/lib clang/include clang/docs

[clang] [clang][Sema] Track trivial-relocatability as a type trait (PR #84621)

2024-03-09 Thread Amirreza Ashouri via cfe-commits
https://github.com/AMP999 updated https://github.com/llvm/llvm-project/pull/84621 >From 2603e170c127aa614d499e5d527db8503a55c651 Mon Sep 17 00:00:00 2001 From: Amirreza Ashouri Date: Sat, 2 Mar 2024 15:37:33 +0330 Subject: [PATCH] [clang][Sema] Track trivial-relocatability as a type trait To

[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][Sema] Track trivial-relocatability as a type trait (PR #84621)

2024-03-09 Thread Amirreza Ashouri via cfe-commits
https://github.com/AMP999 updated https://github.com/llvm/llvm-project/pull/84621 >From 71502300d47f3d5492e6073a3959fe32b0c9cf65 Mon Sep 17 00:00:00 2001 From: Amirreza Ashouri Date: Sat, 2 Mar 2024 15:37:33 +0330 Subject: [PATCH] [clang][Sema] Track trivial-relocatability as a type trait To

[clang] [clang][Sema] Track trivial-relocatability as a type trait (PR #84621)

2024-03-09 Thread Amirreza Ashouri via cfe-commits
https://github.com/AMP999 created https://github.com/llvm/llvm-project/pull/84621 To resolve llvm#69394, this patch separates trivial-relocatability's logic from `canPassInRegisters` to decide if a type is trivial-relocatable. A type passed in registers doesn't necessarily mean

[clang] [clang][NFC] Refactor `clang/test/SemaCXX/type-traits.cpp` to use modern `static_assert` (PR #77584)

2024-03-08 Thread Amirreza Ashouri via cfe-commits
AMP999 wrote: @cor3ntin All checks are green now. Could you help me land this patch for me? https://github.com/llvm/llvm-project/pull/77584 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [clang][NFC] Refactor `clang/test/SemaCXX/type-traits.cpp` to use modern `static_assert` (PR #77584)

2024-03-07 Thread Amirreza Ashouri via cfe-commits
https://github.com/AMP999 deleted https://github.com/llvm/llvm-project/pull/77584 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][NFC] Refactor `clang/test/SemaCXX/type-traits.cpp` to use modern `static_assert` (PR #77584)

2024-03-05 Thread Amirreza Ashouri via cfe-commits
@@ -2875,10 +2875,10 @@ struct __attribute__((packed)) PackedNoPadding2 { int j; short i; }; -static_assert(has_unique_object_representations::value, "Packed structs have no padding"); -static_assert(has_unique_object_representations::value, "Packed structs have no

[clang] [clang][NFC] Refactor `clang/test/SemaCXX/type-traits.cpp` to use modern `static_assert` (PR #77584)

2024-03-05 Thread Amirreza Ashouri via cfe-commits
@@ -214,56 +212,56 @@ struct HasVirtBase : virtual ACompleteType {}; void is_pod() { - { int arr[T(__is_pod(int))]; } - { int arr[T(__is_pod(Enum))]; } - { int arr[T(__is_pod(POD))]; } - { int arr[T(__is_pod(Int))]; } - { int arr[T(__is_pod(IntAr))]; } - { int

[clang] [clang] Support `__is_trivially_copyable(int()&)==false` (PR #81298)

2024-03-04 Thread Amirreza Ashouri via cfe-commits
AMP999 wrote: @cor3ntin I've reflected your suggestions in the code. Could you help me to land this PR, if you it looks good to you? https://github.com/llvm/llvm-project/pull/81298 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [clang] Support `__is_trivially_copyable(int()&)==false` (PR #81298)

2024-03-04 Thread Amirreza Ashouri via cfe-commits
https://github.com/AMP999 updated https://github.com/llvm/llvm-project/pull/81298 >From d59c262b31937fdd2b907ec11d7f08e4a385007c Mon Sep 17 00:00:00 2001 From: Amirreza Ashouri Date: Fri, 9 Feb 2024 21:55:03 +0330 Subject: [PATCH 1/8] [clang] Support `__is_trivially_copyable(int()&)==false`

[clang] [clang] Support `__is_trivially_copyable(int()&)==false` (PR #81298)

2024-03-04 Thread Amirreza Ashouri via cfe-commits
https://github.com/AMP999 updated https://github.com/llvm/llvm-project/pull/81298 >From d59c262b31937fdd2b907ec11d7f08e4a385007c Mon Sep 17 00:00:00 2001 From: Amirreza Ashouri Date: Fri, 9 Feb 2024 21:55:03 +0330 Subject: [PATCH 1/7] [clang] Support `__is_trivially_copyable(int()&)==false`

[clang] [clang] Support `__is_trivially_copyable(int()&)==false` (PR #81298)

2024-03-04 Thread Amirreza Ashouri via cfe-commits
https://github.com/AMP999 updated https://github.com/llvm/llvm-project/pull/81298 >From d59c262b31937fdd2b907ec11d7f08e4a385007c Mon Sep 17 00:00:00 2001 From: Amirreza Ashouri Date: Fri, 9 Feb 2024 21:55:03 +0330 Subject: [PATCH 1/6] [clang] Support `__is_trivially_copyable(int()&)==false`

[clang] [Clang] Fix __has_cpp_attribute and C++11 attributes with arguments in C++03 (PR #83065)

2024-02-26 Thread Amirreza Ashouri via cfe-commits
AMP999 wrote: How about also enabling some existing C++11 tests for C++03 mode, too? E.g. `Preprocessor/has_attribute.cpp`, `SemaCXX/attr-declspec-ignored.cpp`, `SemaCXX/attr-gnu.cpp`, don't run in C++03 mode today but they could be made to. https://github.com/llvm/llvm-project/pull/83065

[clang] [clang] Support `__is_trivially_copyable(int()&)==false` (PR #81298)

2024-02-26 Thread Amirreza Ashouri via cfe-commits
https://github.com/AMP999 updated https://github.com/llvm/llvm-project/pull/81298 >From d59c262b31937fdd2b907ec11d7f08e4a385007c Mon Sep 17 00:00:00 2001 From: Amirreza Ashouri Date: Fri, 9 Feb 2024 21:55:03 +0330 Subject: [PATCH 1/5] [clang] Support `__is_trivially_copyable(int()&)==false`

[clang] [clang] Support `__is_trivially_copyable(int()&)==false` (PR #81298)

2024-02-20 Thread Amirreza Ashouri via cfe-commits
https://github.com/AMP999 updated https://github.com/llvm/llvm-project/pull/81298 >From d59c262b31937fdd2b907ec11d7f08e4a385007c Mon Sep 17 00:00:00 2001 From: Amirreza Ashouri Date: Fri, 9 Feb 2024 21:55:03 +0330 Subject: [PATCH 1/5] [clang] Support `__is_trivially_copyable(int()&)==false`

[clang] [clang] Support `__is_trivially_copyable(int()&)==false` (PR #81298)

2024-02-20 Thread Amirreza Ashouri via cfe-commits
https://github.com/AMP999 updated https://github.com/llvm/llvm-project/pull/81298 >From d59c262b31937fdd2b907ec11d7f08e4a385007c Mon Sep 17 00:00:00 2001 From: Amirreza Ashouri Date: Fri, 9 Feb 2024 21:55:03 +0330 Subject: [PATCH 1/5] [clang] Support `__is_trivially_copyable(int()&)==false`

[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] Support `__is_trivially_copyable(int()&)==false` (PR #81298)

2024-02-12 Thread Amirreza Ashouri via cfe-commits
https://github.com/AMP999 updated https://github.com/llvm/llvm-project/pull/81298 >From d59c262b31937fdd2b907ec11d7f08e4a385007c Mon Sep 17 00:00:00 2001 From: Amirreza Ashouri Date: Fri, 9 Feb 2024 21:55:03 +0330 Subject: [PATCH 1/3] [clang] Support `__is_trivially_copyable(int()&)==false`

[clang] [clang] Support `__is_trivially_copyable(int()&)==false` (PR #81298)

2024-02-11 Thread Amirreza Ashouri via cfe-commits
https://github.com/AMP999 updated https://github.com/llvm/llvm-project/pull/81298 >From d59c262b31937fdd2b907ec11d7f08e4a385007c Mon Sep 17 00:00:00 2001 From: Amirreza Ashouri Date: Fri, 9 Feb 2024 21:55:03 +0330 Subject: [PATCH 1/2] [clang] Support `__is_trivially_copyable(int()&)==false`

[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-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][NFC] Refactor `clang/test/SemaCXX/type-traits.cpp` to use modern `static_assert` (PR #77584)

2024-01-12 Thread Amirreza Ashouri via cfe-commits
@@ -214,56 +212,56 @@ struct HasVirtBase : virtual ACompleteType {}; void is_pod() { - { int arr[T(__is_pod(int))]; } - { int arr[T(__is_pod(Enum))]; } - { int arr[T(__is_pod(POD))]; } - { int arr[T(__is_pod(Int))]; } - { int arr[T(__is_pod(IntAr))]; } - { int

[clang] [clang][NFC] Refactor `clang/test/SemaCXX/type-traits.cpp` to use modern `static_assert` (PR #77584)

2024-01-12 Thread Amirreza Ashouri via cfe-commits
@@ -2875,10 +2875,10 @@ struct __attribute__((packed)) PackedNoPadding2 { int j; short i; }; -static_assert(has_unique_object_representations::value, "Packed structs have no padding"); -static_assert(has_unique_object_representations::value, "Packed structs have no

[clang] [clang][NFC] Refactor `clang/test/SemaCXX/type-traits.cpp` to use modern `static_assert` (PR #77584)

2024-01-10 Thread Amirreza Ashouri via cfe-commits
https://github.com/AMP999 edited https://github.com/llvm/llvm-project/pull/77584 ___ 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-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][NFC] Refactor `clang/test/SemaCXX/type-traits.cpp` to use modern `static_assert` (PR #77584)

2024-01-10 Thread Amirreza Ashouri via cfe-commits
https://github.com/AMP999 edited https://github.com/llvm/llvm-project/pull/77584 ___ 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 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 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 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

[clang] [clang] Non-object types are non-trivially relocatable (PR #69734)

2023-11-28 Thread Amirreza Ashouri via cfe-commits
AMP999 wrote: @cor3ntin I've fixed that. https://github.com/llvm/llvm-project/pull/69734 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Non-object types are non-trivially relocatable (PR #69734)

2023-11-28 Thread Amirreza Ashouri via cfe-commits
https://github.com/AMP999 updated https://github.com/llvm/llvm-project/pull/69734 >From 8cad09416a4e362ea59249e040d6e8aaee54dee3 Mon Sep 17 00:00:00 2001 From: Amirreza Ashouri Date: Sun, 26 Nov 2023 15:06:32 +0330 Subject: [PATCH] [clang] Non-object types are non-trivially relocatable Both

[clang] [clang] Non-object types are non-trivially relocatable (PR #69734)

2023-11-28 Thread Amirreza Ashouri via cfe-commits
https://github.com/AMP999 updated https://github.com/llvm/llvm-project/pull/69734 >From a0b9798dc87b313d9dff08e9fa109bf2d65a863e Mon Sep 17 00:00:00 2001 From: Amirreza Ashouri Date: Sun, 26 Nov 2023 15:06:32 +0330 Subject: [PATCH] [clang] Non-object types are non-trivially relocatable Both

[clang] [clang] Non-object types are non-trivially relocatable (PR #69734)

2023-11-28 Thread Amirreza Ashouri via cfe-commits
AMP999 wrote: Oh, Sure. I didn't noticed that. https://github.com/llvm/llvm-project/pull/69734 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Non-object types are non-trivially relocatable (PR #69734)

2023-11-28 Thread Amirreza Ashouri via cfe-commits
AMP999 wrote: @cor3ntin Could you land this for me, please? https://github.com/llvm/llvm-project/pull/69734 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Non-object types are non-trivially relocatable (PR #69734)

2023-11-26 Thread Amirreza Ashouri via cfe-commits
AMP999 wrote: > LGTM, thanks! You're welcome! https://github.com/llvm/llvm-project/pull/69734 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Non-object types are non-trivially relocatable (PR #69734)

2023-11-26 Thread Amirreza Ashouri via cfe-commits
https://github.com/AMP999 updated https://github.com/llvm/llvm-project/pull/69734 >From befa9931fb8c9e52bb05a9075dfbea7116ff14ea Mon Sep 17 00:00:00 2001 From: Amirreza Ashouri Date: Sun, 26 Nov 2023 15:06:32 +0330 Subject: [PATCH] [clang] Non-object types are non-trivially relocatable Both

[clang] [clang] Non-object types are non-trivially relocatable (PR #69734)

2023-11-16 Thread Amirreza Ashouri via cfe-commits
@@ -477,10 +477,10 @@ Bug Fixes in This Version - Clang now prints unnamed members in diagnostic messages instead of giving an empty ''. Fixes (`#63759 `_) -- Fix crash in __builtin_strncmp and related builtins when the

[clang] [clang] Non-object types are non-trivially relocatable (PR #69734)

2023-11-16 Thread Amirreza Ashouri via cfe-commits
https://github.com/AMP999 updated https://github.com/llvm/llvm-project/pull/69734 >From 187bfbf15993911f6fd17092fad2f7cd7172180b Mon Sep 17 00:00:00 2001 From: Amirreza Ashouri Date: Thu, 16 Nov 2023 15:03:06 +0330 Subject: [PATCH] [clang] Non-object types are non-trivially relocatable Both

[clang] [clang] Non-object types are non-trivially relocatable (PR #69734)

2023-11-14 Thread Amirreza Ashouri via cfe-commits
https://github.com/AMP999 updated https://github.com/llvm/llvm-project/pull/69734 >From ffc19ddcab61b99c9ad71cdf96de32fef6ff666b Mon Sep 17 00:00:00 2001 From: Amirreza Ashouri Date: Sat, 7 Oct 2023 15:18:55 +0330 Subject: [PATCH] [clang] Non-object types are non-trivially relocatable Both

[clang] [clang] Non-object types are non-trivially relocatable (PR #69734)

2023-11-11 Thread Amirreza Ashouri via cfe-commits
AMP999 wrote: Thank you! No problem! I'll add the release notes. https://github.com/llvm/llvm-project/pull/69734 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Non-object types are non-trivially relocatable (PR #69734)

2023-11-11 Thread Amirreza Ashouri via cfe-commits
AMP999 wrote: @cor3ntin Gentle ping! https://github.com/llvm/llvm-project/pull/69734 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Non-object types are non-trivially relocatable (PR #69734)

2023-11-04 Thread Amirreza Ashouri via cfe-commits
AMP999 wrote: @cor3ntin Are these tests what you had in mind? Are they sufficient? What else should I add? https://github.com/llvm/llvm-project/pull/69734 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [clang] Non-object types are non-trivially relocatable (PR #69734)

2023-11-04 Thread Amirreza Ashouri via cfe-commits
https://github.com/AMP999 updated https://github.com/llvm/llvm-project/pull/69734 >From a67c7b8f2af625145c805240fc51f1ecea392ef2 Mon Sep 17 00:00:00 2001 From: Amirreza Ashouri Date: Sat, 7 Oct 2023 15:18:55 +0330 Subject: [PATCH] [clang] Non-object types are non-trivially relocatable Both

[clang] [clang] Non-object types are non-trivially relocatable (PR #69734)

2023-10-20 Thread Amirreza Ashouri via cfe-commits
https://github.com/AMP999 created https://github.com/llvm/llvm-project/pull/69734 Both active C++ proposals (P1144 and P2786) agree that `is_trivially_relocatable_v` and `is_trivially_relocatable_v` should be false, not true. Only complete object types can be trivially relocatable. Fixes

[clang] [clang] __is_trivially_equality_comparable for types containing lambdas (PR #68506)

2023-10-11 Thread Amirreza Ashouri via cfe-commits
AMP999 wrote: @cor3ntin Can you land this for me? https://github.com/llvm/llvm-project/pull/68506 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] __is_trivially_equality_comparable for types containing lambdas (PR #68506)

2023-10-11 Thread Amirreza Ashouri via cfe-commits
https://github.com/AMP999 updated https://github.com/llvm/llvm-project/pull/68506 >From cac3c586a85e1070b2d4aa2ccbc1589c1c84105c Mon Sep 17 00:00:00 2001 From: Amirreza Ashouri Date: Sat, 7 Oct 2023 19:02:34 +0330 Subject: [PATCH 1/3] [clang] Rename some misleading names (Non-functional) ---

[clang] [clang] __is_trivially_equality_comparable for types containing lambdas (PR #68506)

2023-10-11 Thread Amirreza Ashouri via cfe-commits
AMP999 wrote: > I think there is an opportunity for a small refactor here, but feel free to > land this and we can handle the refactor later as an NFC change if you prefer Is this (344455e) what you had in mind? I only found a few places that could use the factored-out function, and in the

[clang] [clang] __is_trivially_equality_comparable for types containing lambdas (PR #68506)

2023-10-11 Thread Amirreza Ashouri via cfe-commits
https://github.com/AMP999 updated https://github.com/llvm/llvm-project/pull/68506 >From fdbeba9c94ddb13ee53a761d9e1a95b044f2c20a Mon Sep 17 00:00:00 2001 From: Amirreza Ashouri Date: Sat, 7 Oct 2023 19:02:34 +0330 Subject: [PATCH 1/3] [clang] Rename some misleading names (Non-functional)

[clang] [clang] __is_trivially_equality_comparable for types containing lambdas (PR #68506)

2023-10-11 Thread Amirreza Ashouri via cfe-commits
https://github.com/AMP999 updated https://github.com/llvm/llvm-project/pull/68506 >From fdbeba9c94ddb13ee53a761d9e1a95b044f2c20a Mon Sep 17 00:00:00 2001 From: Amirreza Ashouri Date: Sat, 7 Oct 2023 19:02:34 +0330 Subject: [PATCH 1/3] [clang] Rename some misleading names (Non-functional)

[clang] [clang] __is_trivially_equality_comparable for types containing lambdas (PR #68506)

2023-10-11 Thread Amirreza Ashouri via cfe-commits
https://github.com/AMP999 updated https://github.com/llvm/llvm-project/pull/68506 >From fdbeba9c94ddb13ee53a761d9e1a95b044f2c20a Mon Sep 17 00:00:00 2001 From: Amirreza Ashouri Date: Sat, 7 Oct 2023 19:02:34 +0330 Subject: [PATCH 1/3] [clang] Rename some misleading names (Non-functional)

[clang] [clang] __is_trivially_equality_comparable for types containing lambdas (PR #68506)

2023-10-11 Thread Amirreza Ashouri via cfe-commits
https://github.com/AMP999 updated https://github.com/llvm/llvm-project/pull/68506 >From fdbeba9c94ddb13ee53a761d9e1a95b044f2c20a Mon Sep 17 00:00:00 2001 From: Amirreza Ashouri Date: Sat, 7 Oct 2023 19:02:34 +0330 Subject: [PATCH 1/3] [clang] Rename some misleading names (Non-functional)

[clang] [clang] __is_trivially_equality_comparable for types containing lambdas (PR #68506)

2023-10-11 Thread Amirreza Ashouri via cfe-commits
https://github.com/AMP999 updated https://github.com/llvm/llvm-project/pull/68506 >From 32bcab427637432621590a64afaad1677fe832cb Mon Sep 17 00:00:00 2001 From: Amirreza Ashouri Date: Sat, 7 Oct 2023 19:02:34 +0330 Subject: [PATCH 1/3] [clang] Rename some misleading names (Non-functional)

[clang] [clang] __is_trivially_equality_comparable for types containing lambdas (PR #68506)

2023-10-08 Thread Amirreza Ashouri via cfe-commits
https://github.com/AMP999 updated https://github.com/llvm/llvm-project/pull/68506 >From ae2cd56b1c68353aae6c74524e71973ce6ca6904 Mon Sep 17 00:00:00 2001 From: Amirreza Ashouri Date: Sat, 7 Oct 2023 19:02:34 +0330 Subject: [PATCH 1/2] [clang] Rename some misleading names (Non-functional)

[clang] [clang] __is_trivially_equality_comparable for types containing lambdas (PR #68506)

2023-10-08 Thread Amirreza Ashouri via cfe-commits
https://github.com/AMP999 updated https://github.com/llvm/llvm-project/pull/68506 >From ae2cd56b1c68353aae6c74524e71973ce6ca6904 Mon Sep 17 00:00:00 2001 From: Amirreza Ashouri Date: Sat, 7 Oct 2023 19:02:34 +0330 Subject: [PATCH 1/2] [clang] Rename some misleading names (Non-functional)

[clang] [clang] __is_trivially_equality_comparable for types containing lambdas (PR #68506)

2023-10-08 Thread Amirreza Ashouri via cfe-commits
https://github.com/AMP999 created https://github.com/llvm/llvm-project/pull/68506 Lambdas (closure types) are trivially equality-comparable iff they are non-capturing, because non-capturing lambdas are convertible to function pointers: if (lam1 == lam2) compiles, then lam1 and lam2 must have