[clang] [Clang] Non-polymorphic trivially relocatable types can have [[trivial_abi]] (PR #143111)

2025-06-09 Thread Corentin Jabot via cfe-commits
https://github.com/cor3ntin closed https://github.com/llvm/llvm-project/pull/143111 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] d56ce31 - [Clang] Non-polymorphic trivially relocatable types can have [[trivial_abi]] (#143111)

2025-06-09 Thread via cfe-commits
.diff LOG: [Clang] Non-polymorphic trivially relocatable types can have [[trivial_abi]] (#143111) Use the definition of trivially relocatable types to short-circuit some checks for trivial_abi. Note that this is mostly a no-op as there is a lot of overlap between trivial_abi and trivial

[clang] [Clang] Clarify the `[[trivial_abi]]` documentation. (PR #143243)

2025-06-09 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `sanitizer-aarch64-linux-bootstrap-hwasan` running on `sanitizer-buildbot12` while building `clang` at step 2 "annotate". Full details are available at: https://lab.llvm.org/buildbot/#/builders/55/builds/12538 Here is the re

[clang] [Clang] Non-polymorphic trivially relocatable types can have [[trivial_abi]] (PR #143111)

2025-06-09 Thread Corentin Jabot via cfe-commits
can have [[trivial_abi]] Use the definition of trivially relocatable types to short circuit some checks for trivial_abi. Note that this is mostly a no-op as there is a lot of overlap between trivial_abi and trivial relocatability (ie I can't envision a scenario in which there would be a t

[clang] 9c52b3c - [Clang] Clarify the `[[trivial_abi]]` documentation. (#143243)

2025-06-09 Thread via cfe-commits
.diff LOG: [Clang] Clarify the `[[trivial_abi]]` documentation. (#143243) Fixes #36667 Added: Modified: clang/include/clang/Basic/AttrDocs.td Removed: diff --git a/clang/include/clang/Basic

[clang] [Clang] Clarify the `[[trivial_abi]]` documentation. (PR #143243)

2025-06-09 Thread Corentin Jabot via cfe-commits
https://github.com/cor3ntin closed https://github.com/llvm/llvm-project/pull/143243 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Clarify the `[[trivial_abi]]` documentation. (PR #143243)

2025-06-09 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. https://github.com/llvm/llvm-project/pull/143243 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Clarify the `[[trivial_abi]]` documentation. (PR #143243)

2025-06-09 Thread Corentin Jabot via cfe-commits
https://github.com/cor3ntin updated https://github.com/llvm/llvm-project/pull/143243 >From 9b6128211ea4a442ecded830c77c60387245bb89 Mon Sep 17 00:00:00 2001 From: Corentin Jabot Date: Sat, 7 Jun 2025 10:24:26 +0200 Subject: [PATCH 1/2] [Clang] Clarify the `[[trivial_abi]]` documentat

[clang] [Clang] Clarify the `[[trivial_abi]]` documentation. (PR #143243)

2025-06-09 Thread Shafik Yaghmour via cfe-commits
of ``__is_trivially_relocatable``. +relocatable for the purpose of ``__is_trivially_relocatable`` and +``__builtin_is_cpp_trivially_relocatable``. +The copy constructor of an object of such type might not be called +when the object is passed to a function. Therefore, the ``trivial_abi`` +attribute

[clang] [Clang] Clarify the `[[trivial_abi]]` documentation. (PR #143243)

2025-06-09 Thread Erich Keane via cfe-commits
of ``__is_trivially_relocatable``. +relocatable for the purpose of ``__is_trivially_relocatable`` and +``__builtin_is_cpp_trivially_relocatable``. +The copy constructor of an object of such type might not be called +when the object is passed to a function. Therefore, the ``trivial_abi`` +attribute

[clang] [Clang] Clarify the `[[trivial_abi]]` documentation. (PR #143243)

2025-06-09 Thread Erich Keane via cfe-commits
of ``__is_trivially_relocatable``. +relocatable for the purpose of ``__is_trivially_relocatable`` and +``__builtin_is_cpp_trivially_relocatable``. +The copy constructor of an object of such type might not be called +when the object is passed to a function. Therefore, the ``trivial_abi`` +attribute

[clang] [Clang] Non-polymorphic trivially relocatable types can have [[trivial_abi]] (PR #143111)

2025-06-09 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman approved this pull request. LGTM! https://github.com/llvm/llvm-project/pull/143111 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Clarify the `[[trivial_abi]]` documentation. (PR #143243)

2025-06-09 Thread Corentin Jabot via cfe-commits
https://github.com/cor3ntin updated https://github.com/llvm/llvm-project/pull/143243 >From 9b6128211ea4a442ecded830c77c60387245bb89 Mon Sep 17 00:00:00 2001 From: Corentin Jabot Date: Sat, 7 Jun 2025 10:24:26 +0200 Subject: [PATCH 1/2] [Clang] Clarify the `[[trivial_abi]]` documentat

[clang] [Clang] Non-polymorphic trivially relocatable types can have [[trivial_abi]] (PR #143111)

2025-06-09 Thread Corentin Jabot via cfe-commits
@@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -std=c++11 -fobjc-runtime-has-weak -fobjc-weak -fobjc-arc -fsyntax-only -verify %s +// RUN: %clang_cc1 -std=c++11 -fobjc-runtime-has-weak -fobjc-weak -fobjc-arc -triple x86_64-apple-darwin -fsyntax-only -verify %s cor3ntin wro

[clang] [Clang] Non-polymorphic trivially relocatable types can have [[trivial_abi]] (PR #143111)

2025-06-09 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman commented: This also needs a release note in `clang/docs/ReleaseNotes.rst` https://github.com/llvm/llvm-project/pull/143111 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/l

[clang] [Clang] Non-polymorphic trivially relocatable types can have [[trivial_abi]] (PR #143111)

2025-06-09 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman edited https://github.com/llvm/llvm-project/pull/143111 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Non-polymorphic trivially relocatable types can have [[trivial_abi]] (PR #143111)

2025-06-09 Thread Aaron Ballman via cfe-commits
@@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -std=c++11 -fobjc-runtime-has-weak -fobjc-weak -fobjc-arc -fsyntax-only -verify %s +// RUN: %clang_cc1 -std=c++11 -fobjc-runtime-has-weak -fobjc-weak -fobjc-arc -triple x86_64-apple-darwin -fsyntax-only -verify %s AaronBallman

[clang] [Clang] Clarify the `[[trivial_abi]]` documentation. (PR #143243)

2025-06-09 Thread via cfe-commits
of ``__is_trivially_relocatable``. +relocatable for the purpose of ``__is_trivially_relocatable`` and +``__builtin_is_cpp_trivially_relocatable``. +The copy constructor of a an object of such type might not be called +when the object is passed to a function. Therefore, the ``trivial_abi`` +attribute

[clang] [Clang] Clarify the `[[trivial_abi]]` documentation. (PR #143243)

2025-06-07 Thread via cfe-commits
+``__builtin_is_cpp_trivially_relocatable``. +The copy constructor of a an object of such type might not be called +when the object is passed to a function. Therefore, the ``trivial_abi`` +attribute should not be applied to objects that contain pointer to themselves. Attribute ``trivial_abi`` has no effect in the

[clang] [Clang] Clarify the `[[trivial_abi]]` documentation. (PR #143243)

2025-06-07 Thread Corentin Jabot via cfe-commits
https://github.com/cor3ntin created https://github.com/llvm/llvm-project/pull/143243 Fixes #36667 >From 9b6128211ea4a442ecded830c77c60387245bb89 Mon Sep 17 00:00:00 2001 From: Corentin Jabot Date: Sat, 7 Jun 2025 10:24:26 +0200 Subject: [PATCH] [Clang] Clarify the `[[trivial_

[clang] [Clang] Non-polymorphic trivially relocatable types can have [[trivial_abi]] (PR #143111)

2025-06-07 Thread Corentin Jabot via cfe-commits
can have [[trivial_abi]] Use the definition of trivially relocatable types to short circuit some checks for trivial_abi. Note that this is mostly a no-op as there is a lot of overlap between trivial_abi and trivial relocatability (ie I can't envision a scenario in which there would be a t

[clang] [Clang] Non-polymorphic trivially relocatable types can have [[trivial_abi]] (PR #143111)

2025-06-06 Thread Corentin Jabot via cfe-commits
can have [[trivial_abi]] Use the definition of trivially relocatable types to short circuit some checks for trivial_abi. Note that this is mostly a no-op as there is a lot of overlap between trivial_abi and trivial relocatability (ie I can't envision a scenario in which there would be a t

[clang] [Clang] Non-polymorphic trivially relocatable types can have [[trivial_abi]] (PR #143111)

2025-06-06 Thread Corentin Jabot via cfe-commits
ave [[trivial_abi]] Use the definition of trivially relocatable types to short circuit some checks for trivial_abi. Note that this is mostly a no-op as there is a lot of overlap between trivial_abi and trivial relocatability (ie I can't envision a scenario in which there would be a t

[clang] [Clang] Non-polymorphic trivially relocatable types can have [[trivial_abi]] (PR #143111)

2025-06-06 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman commented: I'd like to see codegen tests which verify that we actually do try to pass in registers in this case. Also, the changes should come with a release note. https://github.com/llvm/llvm-project/pull/143111 ___ cf

[clang] [Clang] Non-polymorphic trivially relocatable types can have [[trivial_abi]] (PR #143111)

2025-06-06 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Corentin Jabot (cor3ntin) Changes Use the definition of trivially relocatable types to short-circuit some checks for trivial_abi. Note that this is mostly a no-op as there is a lot of overlap between trivial_abi and trivial

[clang] [Clang] Non-polymorphic trivially relocatable types can have [[trivial_abi]] (PR #143111)

2025-06-06 Thread Corentin Jabot via cfe-commits
https://github.com/cor3ntin created https://github.com/llvm/llvm-project/pull/143111 Use the definition of trivially relocatable types to short-circuit some checks for trivial_abi. Note that this is mostly a no-op as there is a lot of overlap between trivial_abi and trivial relocatability

[clang] [clang] Handle trivial_abi attribute for Microsoft ABI. (PR #88857)

2024-11-15 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > Yeah. It's still on my list to update the patch to be recursive - but it's > been a pretty busy period and I haven't gotten around to it yet. Excellent! Nothing is on fire here, so whenever you get around to it, that's great. :-) https://github.com/llvm/llvm-project/pull

[clang] [clang] Handle trivial_abi attribute for Microsoft ABI. (PR #88857)

2024-11-14 Thread Tobias Hieta via cfe-commits
tru wrote: Yeah. It's still on my list to update the patch to be recursive - but it's been a pretty busy period and I haven't gotten around to it yet. https://github.com/llvm/llvm-project/pull/88857 ___ cfe-commits mailing list cfe-commits@lists.llvm

[clang] [clang] Handle trivial_abi attribute for Microsoft ABI. (PR #88857)

2024-11-14 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: The original patch just changed the calling convention for structs explicitly marked trivial_abi. @rnk wanted to instead introduce the notion of a "trivial-abi-aware" type, i.e. a type that is either trivial_abi, or contains a trivial-abi-aware field/base. The

[clang] [clang] Handle trivial_abi attribute for Microsoft ABI. (PR #88857)

2024-11-14 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: What is left to tackle so this can be merged? (I ran into this via looking at https://github.com/llvm/llvm-project/issues/87993) https://github.com/llvm/llvm-project/pull/88857 ___ cfe-commits mailing list cfe-commits@lists.llvm.or

[clang] adfa6b7 - Document that the lifetime of the caller-side `trivial_abi` parameter ends before the call. (#116100)

2024-11-13 Thread via cfe-commits
LOG: Document that the lifetime of the caller-side `trivial_abi` parameter ends before the call. (#116100) Fixes #116096. Added: Modified: clang/include/clang/Basic/AttrDocs.td Removed: diff

[clang] Document that the lifetime of the caller-side `trivial_abi` parameter ends before the call. (PR #116100)

2024-11-13 Thread Richard Smith via cfe-commits
https://github.com/zygoloid closed https://github.com/llvm/llvm-project/pull/116100 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Document that the lifetime of the caller-side `trivial_abi` parameter ends before the call. (PR #116100)

2024-11-13 Thread John McCall via cfe-commits
https://github.com/rjmccall approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/116100 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Document that the lifetime of the caller-side `trivial_abi` parameter ends before the call. (PR #116100)

2024-11-13 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Richard Smith (zygoloid) Changes Fixes #116096. --- Full diff: https://github.com/llvm/llvm-project/pull/116100.diff 1 Files Affected: - (modified) clang/include/clang/Basic/AttrDocs.td (+2-1) ``diff diff --git a/clang/includ

[clang] Document that the lifetime of the caller-side `trivial_abi` parameter ends before the call. (PR #116100)

2024-11-13 Thread Richard Smith via cfe-commits
ide `trivial_abi` parameter ends before the call. Fixes #116096. --- clang/include/clang/Basic/AttrDocs.td | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/clang/include/clang/Basic/AttrDocs.td b/clang/include/clang/Basic/AttrDocs.td index 21fcd183e8969c..8044eb80a44a72 100

[clang] [clang] Handle trivial_abi attribute for Microsoft ABI. (PR #88857)

2024-04-29 Thread Reid Kleckner via cfe-commits
@@ -1105,6 +1105,11 @@ bool MicrosoftCXXABI::hasMostDerivedReturn(GlobalDecl GD) const { static bool isTrivialForMSVC(const CXXRecordDecl *RD, QualType Ty, CodeGenModule &CGM) { + // If the record is marked with the trivial_abi attribute

[clang] [clang] Handle trivial_abi attribute for Microsoft ABI. (PR #88857)

2024-04-29 Thread Tobias Hieta via cfe-commits
@@ -1105,6 +1105,11 @@ bool MicrosoftCXXABI::hasMostDerivedReturn(GlobalDecl GD) const { static bool isTrivialForMSVC(const CXXRecordDecl *RD, QualType Ty, CodeGenModule &CGM) { + // If the record is marked with the trivial_abi attribute

[clang] [clang] Handle trivial_abi attribute for Microsoft ABI. (PR #88857)

2024-04-29 Thread Reid Kleckner via cfe-commits
rnk wrote: Sorry for the delay, work life does its best to intervene. https://github.com/llvm/llvm-project/pull/88857 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Handle trivial_abi attribute for Microsoft ABI. (PR #88857)

2024-04-29 Thread Reid Kleckner via cfe-commits
@@ -1105,6 +1105,11 @@ bool MicrosoftCXXABI::hasMostDerivedReturn(GlobalDecl GD) const { static bool isTrivialForMSVC(const CXXRecordDecl *RD, QualType Ty, CodeGenModule &CGM) { + // If the record is marked with the trivial_abi attribute

[clang] [clang] Handle trivial_abi attribute for Microsoft ABI. (PR #88857)

2024-04-29 Thread Tobias Hieta via cfe-commits
tru wrote: ping on this. https://github.com/llvm/llvm-project/pull/88857 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Handle trivial_abi attribute for Microsoft ABI. (PR #88857)

2024-04-18 Thread Tobias Hieta via cfe-commits
@@ -1105,6 +1105,11 @@ bool MicrosoftCXXABI::hasMostDerivedReturn(GlobalDecl GD) const { static bool isTrivialForMSVC(const CXXRecordDecl *RD, QualType Ty, CodeGenModule &CGM) { + // If the record is marked with the trivial_abi attribute

[clang] [clang] Handle trivial_abi attribute for Microsoft ABI. (PR #88857)

2024-04-18 Thread Eli Friedman via cfe-commits
@@ -1105,6 +1105,11 @@ bool MicrosoftCXXABI::hasMostDerivedReturn(GlobalDecl GD) const { static bool isTrivialForMSVC(const CXXRecordDecl *RD, QualType Ty, CodeGenModule &CGM) { + // If the record is marked with the trivial_abi attribute

[clang] [clang] Handle trivial_abi attribute for Microsoft ABI. (PR #88857)

2024-04-18 Thread Reid Kleckner via cfe-commits
@@ -1105,6 +1105,11 @@ bool MicrosoftCXXABI::hasMostDerivedReturn(GlobalDecl GD) const { static bool isTrivialForMSVC(const CXXRecordDecl *RD, QualType Ty, CodeGenModule &CGM) { + // If the record is marked with the trivial_abi attribute

[clang] [clang] Handle trivial_abi attribute for Microsoft ABI. (PR #88857)

2024-04-18 Thread Reid Kleckner via cfe-commits
https://github.com/rnk requested changes to this pull request. https://github.com/llvm/llvm-project/pull/88857 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Handle trivial_abi attribute for Microsoft ABI. (PR #88857)

2024-04-18 Thread Reid Kleckner via cfe-commits
https://github.com/rnk edited https://github.com/llvm/llvm-project/pull/88857 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Handle trivial_abi attribute for Microsoft ABI. (PR #88857)

2024-04-18 Thread Reid Kleckner via cfe-commits
@@ -1105,6 +1105,11 @@ bool MicrosoftCXXABI::hasMostDerivedReturn(GlobalDecl GD) const { static bool isTrivialForMSVC(const CXXRecordDecl *RD, QualType Ty, CodeGenModule &CGM) { + // If the record is marked with the trivial_abi attribute

[clang] [clang] Handle trivial_abi attribute for Microsoft ABI. (PR #88857)

2024-04-18 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/88857 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Handle trivial_abi attribute for Microsoft ABI. (PR #88857)

2024-04-16 Thread Tobias Hieta via cfe-commits
tru wrote: @efriedma-quic are you ok with this change? https://github.com/llvm/llvm-project/pull/88857 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Handle trivial_abi attribute for Microsoft ABI. (PR #88857)

2024-04-16 Thread Reid Kleckner via cfe-commits
https://github.com/rnk approved this pull request. Thanks! https://github.com/llvm/llvm-project/pull/88857 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Handle trivial_abi attribute for Microsoft ABI. (PR #88857)

2024-04-16 Thread Reid Kleckner via cfe-commits
@@ -0,0 +1,21 @@ +// RUN: %clang_cc1 -triple x86_64-pc-windows-msvc -std=c++11 -fcxx-exceptions -fexceptions -emit-llvm -o - %s | FileCheck %s + +// CHECK: %[[STRUCT_TRIVIAL:.*]] = type { ptr } +struct __attribute__((trivial_abi)) Trivial { + int *p; + Trivial() : p(0

[clang] [clang] Handle trivial_abi attribute for Microsoft ABI. (PR #88857)

2024-04-16 Thread Tobias Hieta via cfe-commits
https://github.com/tru updated https://github.com/llvm/llvm-project/pull/88857 >From 08214d87d1a7c83ea25eef3bf18de1568a20a152 Mon Sep 17 00:00:00 2001 From: Tobias Hieta Date: Tue, 16 Apr 2024 09:38:53 +0200 Subject: [PATCH] [clang] Handle trivial_abi attribute for Microsoft ABI. Previou

[clang] [clang] Handle trivial_abi attribute for Microsoft ABI. (PR #88857)

2024-04-16 Thread Tobias Hieta via cfe-commits
@@ -0,0 +1,21 @@ +// RUN: %clang_cc1 -triple x86_64-pc-windows-msvc -std=c++11 -fcxx-exceptions -fexceptions -emit-llvm -o - %s | FileCheck %s + +// CHECK: %[[STRUCT_TRIVIAL:.*]] = type { ptr } +struct __attribute__((trivial_abi)) Trivial { + int *p; + Trivial() : p(0

[clang] [clang] Handle trivial_abi attribute for Microsoft ABI. (PR #88857)

2024-04-16 Thread Reid Kleckner via cfe-commits
@@ -0,0 +1,21 @@ +// RUN: %clang_cc1 -triple x86_64-pc-windows-msvc -std=c++11 -fcxx-exceptions -fexceptions -emit-llvm -o - %s | FileCheck %s + +// CHECK: %[[STRUCT_TRIVIAL:.*]] = type { ptr } +struct __attribute__((trivial_abi)) Trivial { + int *p; + Trivial() : p(0

[clang] [clang] Handle trivial_abi attribute for Microsoft ABI. (PR #88857)

2024-04-16 Thread Reid Kleckner via cfe-commits
@@ -63,6 +63,10 @@ ABI Changes in This Version MSVC uses a different mangling for these objects, compatibility is not affected. (#GH85423). +- The attribute ``trivial_abi`` now works when targetting the Microsoft ABI. Marking rnk wrote: It's o

[clang] [clang] Handle trivial_abi attribute for Microsoft ABI. (PR #88857)

2024-04-16 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: Tobias Hieta (tru) Changes Previously the trivial_abi was ignored for records when targetting the microsoft abi, the MSVC rules where always enforced to ensure compatibility with MSVC. This commit changes it to be closer to the

[clang] [clang] Handle trivial_abi attribute for Microsoft ABI. (PR #88857)

2024-04-16 Thread Tobias Hieta via cfe-commits
https://github.com/tru created https://github.com/llvm/llvm-project/pull/88857 Previously the trivial_abi was ignored for records when targetting the microsoft abi, the MSVC rules where always enforced to ensure compatibility with MSVC. This commit changes it to be closer to the itanium abi

[PATCH] D158532: Anonymous unions should be transparent wrt `[[clang::trivial_abi]]`.

2023-09-13 Thread Łukasz Anforowicz via Phabricator via cfe-commits
lukasza added a comment. @gribozavr2 - ping? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D158532/new/ https://reviews.llvm.org/D158532 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lis

[PATCH] D158532: Anonymous unions should be transparent wrt `[[clang::trivial_abi]]`.

2023-08-22 Thread Łukasz Anforowicz via Phabricator via cfe-commits
lukasza added a comment. The delta from https://reviews.llvm.org/D155895 is in `clang/test/SemaCXX/attr-trivial-abi.cpp` where 1) a comment has been added above the non-trivial move constructor of the `Trivial` test helper and 2) test expectations have been tweaked to account for `_WIN64` and `

[PATCH] D158532: Anonymous unions should be transparent wrt `[[clang::trivial_abi]]`.

2023-08-22 Thread Łukasz Anforowicz via Phabricator via cfe-commits
/D155895. Consider the test input below: struct [[clang::trivial_abi]] Trivial { Trivial() {} Trivial(Trivial&& other) {} Trivial& operator=(Trivial&& other) { return *this; } ~Trivial() {} }; static_assert(__is_trivially_relocatable(Trivial), &quo

[PATCH] D155895: Anonymous unions should be transparent wrt `[[clang::trivial_abi]]`.

2023-08-07 Thread Nico Weber via Phabricator via cfe-commits
thakis added a comment. Reverted in 0342bbf223fa12701a0570a23f9eac433b8b341c for now, thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155895/new/ https://reviews.llvm.org/D155895 ___ cfe-commits ma

[clang] 0342bbf - Revert "Anonymous unions should be transparent wrt `[[clang::trivial_abi]]`."

2023-08-07 Thread Nico Weber via cfe-commits
LOG: Revert "Anonymous unions should be transparent wrt `[[clang::trivial_abi]]`." This reverts commit bddaa35177861545fc329123e55b6a3b34549507. Reverting as requested at https://reviews.llvm.org/D155895#4566945 (for breaking tests on Windows). Added: Modified: clang/inc

[PATCH] D155895: Anonymous unions should be transparent wrt `[[clang::trivial_abi]]`.

2023-08-07 Thread Łukasz Anforowicz via Phabricator via cfe-commits
usUnionsAndStructs::TrivialAbiAttributeAppliedToAnonymousUnion)': error: 'warning' diagnostics seen but not expected: File C:\src\llvm-project\clang\test\SemaCXX\attr-trivial-abi.cpp Line 194: 'trivial_abi' cannot be applied to 'BasicStruct'

[PATCH] D155895: Anonymous unions should be transparent wrt `[[clang::trivial_abi]]`.

2023-08-07 Thread Nico Weber via Phabricator via cfe-commits
thakis added a comment. Looks like this breaks tests on windows: http://45.33.8.238/win/82239/step_7.txt Please take a look and revert for now if it takes a while to fix. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155895/new/ https://reviews.ll

[PATCH] D155895: Anonymous unions should be transparent wrt `[[clang::trivial_abi]]`.

2023-08-07 Thread Dmitri Gribenko via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGbddaa3517786: Anonymous unions should be transparent wrt `[[clang::trivial_abi]]`. (authored by gribozavr). Changed prior to commit: https

[clang] bddaa35 - Anonymous unions should be transparent wrt `[[clang::trivial_abi]]`.

2023-08-07 Thread Dmitri Gribenko via cfe-commits
.diff LOG: Anonymous unions should be transparent wrt `[[clang::trivial_abi]]`. Anonymous unions should be transparent wrt `[[clang::trivial_abi]]`. Consider the test input below: ``` struct [[clang::trivial_abi]] Trivial { Trivial() {} Trivial(Trivial&& other) {} Trivial&a

[PATCH] D155895: Anonymous unions should be transparent wrt `[[clang::trivial_abi]]`.

2023-08-07 Thread Łukasz Anforowicz via Phabricator via cfe-commits
/SemaCXX/attr-trivial-abi.cpp @@ -1,4 +1,5 @@ // RUN: %clang_cc1 -fsyntax-only -verify %s -std=c++11 +// RUN: %clang_cc1 -fsyntax-only -fclang-abi-compat=17 -verify %s -std=c++11 -DCLANG_ABI_COMPAT=17 void __attribute__((trivial_abi)) foo(); // expected-warning {{'trivial_abi' attribu

[PATCH] D155895: Anonymous unions should be transparent wrt `[[clang::trivial_abi]]`.

2023-08-04 Thread Dmitri Gribenko via Phabricator via cfe-commits
gribozavr2 accepted this revision. gribozavr2 added inline comments. This revision is now accepted and ready to land. Comment at: clang/test/SemaCXX/attr-trivial-abi.cpp:258 + static_assert(__is_trivially_relocatable(TrivialAbiAttributeAppliedToAnonymousUnion), ""); +#endif +

[PATCH] D155895: Anonymous unions should be transparent wrt `[[clang::trivial_abi]]`.

2023-07-27 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. LGTM, though please wait a day or two for any more comments from @gribozavr2 since he's looked at this more closely than I have. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155895/new/ https://reviews.llvm.org/D155895 _

[PATCH] D155895: Anonymous unions should be transparent wrt `[[clang::trivial_abi]]`.

2023-07-26 Thread Łukasz Anforowicz via Phabricator via cfe-commits
-fsyntax-only -verify %s -std=c++11 +// RUN: %clang_cc1 -fsyntax-only -fclang-abi-compat=17 -verify %s -std=c++11 -DCLANG_ABI_COMPAT=17 void __attribute__((trivial_abi)) foo(); // expected-warning {{'trivial_abi' attribute only applies to classes}} @@ -169,3 +170,104 @@ sta

[PATCH] D155895: Anonymous unions should be transparent wrt `[[clang::trivial_abi]]`.

2023-07-26 Thread Łukasz Anforowicz via Phabricator via cfe-commits
+1,5 @@ // RUN: %clang_cc1 -fsyntax-only -verify %s -std=c++11 +// RUN: %clang_cc1 -fsyntax-only -fclang-abi-compat=17 -verify %s -std=c++11 -DCLANG_ABI_COMPAT=17 void __attribute__((trivial_abi)) foo(); // expected-warning {{'trivial_abi' attribute only applies to classes}} @@ -169,

[PATCH] D155895: Anonymous unions should be transparent wrt `[[clang::trivial_abi]]`.

2023-07-26 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added inline comments. Comment at: clang/lib/Sema/SemaDeclCXX.cpp:10339-10343 + if (RT->getDecl()->isAnonymousStructOrUnion()) { +FieldsToCheck.append(RT->getDecl()->field_begin(), + RT->getDecl()->field_end()); +continue; +

[PATCH] D155895: Anonymous unions should be transparent wrt `[[clang::trivial_abi]]`.

2023-07-24 Thread Łukasz Anforowicz via Phabricator via cfe-commits
lukasza added a comment. In D155895#4525417 , @gribozavr2 wrote: > @lukasza I think you forgot to upload an updated version of the patch. Ooops, sorry about that. I've been trying to use `arc`, but it seems that it has uploaded separate reviews at htt

[PATCH] D155895: Anonymous unions should be transparent wrt `[[clang::trivial_abi]]`.

2023-07-24 Thread Łukasz Anforowicz via Phabricator via cfe-commits
(__is_trivially_relocatable(S20), ""); #endif } // namespace deletedCopyMoveConstructor + +namespace anonymousUnionsAndStructs { + // Test helper: + struct [[clang::trivial_abi]] Trivial { +Trivial() {} +Trivial(Trivial&& other) {} +Trivial& operator=(Trivial&& other) {

[PATCH] D155895: Anonymous unions should be transparent wrt `[[clang::trivial_abi]]`.

2023-07-22 Thread Dmitri Gribenko via Phabricator via cfe-commits
gribozavr2 added a comment. @lukasza I think you forgot to upload an updated version of the patch. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155895/new/ https://reviews.llvm.org/D155895 ___ cfe-commi

[PATCH] D155895: Anonymous unions should be transparent wrt `[[clang::trivial_abi]]`.

2023-07-21 Thread Łukasz Anforowicz via Phabricator via cfe-commits
lukasza marked 5 inline comments as done. lukasza added inline comments. Comment at: clang/lib/Sema/SemaDeclCXX.cpp:10325 - for (const auto *FD : RD.fields()) { -// Ill-formed if the field is an ObjectiveC pointer or of a type that is -// non-trivial for the purpose of

[PATCH] D156003: Anonymous unions should be transparent wrt `[[clang::trivial_abi]]`.

2023-07-21 Thread Łukasz Anforowicz via Phabricator via cfe-commits
lukasza created this revision. Herald added a project: All. lukasza requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Consider the test input below: struct [[clang::trivial_abi]] Trivial { Trivial() {} Trivial(Trivial&&am

[PATCH] D155895: Anonymous unions should be transparent wrt `[[clang::trivial_abi]]`.

2023-07-21 Thread Dmitri Gribenko via Phabricator via cfe-commits
attr-trivial-abi.cpp:201-202 + + // `S2` is like `S1`, but `field` is wrapped in an anonymous union (and it + // seems that trivial relocatability of `S1` and `S2` should be the same). + // Comment at: clang/test/SemaCXX/attr-trivial-abi.cpp:232 + // `S2` an

[PATCH] D155895: Anonymous unions should be transparent wrt `[[clang::trivial_abi]]`.

2023-07-20 Thread Łukasz Anforowicz via Phabricator via cfe-commits
lukasza added inline comments. Comment at: clang/lib/Sema/SemaDeclCXX.cpp:10299 if (!HasNonDeletedCopyOrMoveConstructor()) { PrintDiagAndRemoveAttr(0); I tried to change this condition to `!RD.isAnonymousStructOrUnion() && !HasNonDeletedCopyOrMoveConst

[PATCH] D123059: re-roll-forward "[clang] Mark `trivial_abi` types as "trivially relocatable"".""

2022-04-28 Thread Dmitri Gribenko via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGf2b31f06b79a: re-roll-forward "[clang] Mark `trivial_abi` types as "trivially relocatable""."" (authored by devin.jeanpierre, committed by gribozavr). Repository: rG

[clang] f2b31f0 - re-roll-forward "[clang] Mark `trivial_abi` types as "trivially relocatable"".""

2022-04-28 Thread Dmitri Gribenko via cfe-commits
.diff LOG: re-roll-forward "[clang] Mark `trivial_abi` types as "trivially relocatable""."" This reverts commit b0bc93da926a943cdc2d8b04f8dcbe23a774520c. Changes: `s/_WIN32/_WIN64/g` in clang/test/SemaCXX/attr-trivial-abi.cpp. The calling convention is specific to 64

[PATCH] D123059: re-roll-forward "[clang] Mark `trivial_abi` types as "trivially relocatable"".""

2022-04-04 Thread Devin Jeanpierre via Phabricator via cfe-commits
rivially_relocatable(NontrivialCopyCtor), ""); +static_assert(!__is_trivially_relocatable(NontrivialCopyCtor[]), ""); + +struct NontrivialMoveCtor { + NontrivialMoveCtor(NontrivialMoveCtor&&) {} +}; +static_assert(!__is_trivially_relocatable(NontrivialMoveCtor), ""); +static_

[PATCH] D119017: [clang] roll-forward "[clang] Mark `trivial_abi` types as "trivially relocatable"".

2022-04-04 Thread Devin Jeanpierre via Phabricator via cfe-commits
devin.jeanpierre added a comment. In D119017#3400347 , @devin.jeanpierre wrote: > I don't have easy access to a Windows machine at work so am struggling with > the reproduction instructions. Well, after much procrastinating, and an hour of fiddling wit

[clang] b0bc93d - Revert "[clang] roll-forward "[clang] Mark `trivial_abi` types as "trivially relocatable""."

2022-03-23 Thread Zahira Ammarguellat via cfe-commits
/b0bc93da926a943cdc2d8b04f8dcbe23a774520c.diff LOG: Revert "[clang] roll-forward "[clang] Mark `trivial_abi` types as "trivially relocatable""." This reverts commit 56d46b36fc231a0beb518602503035bba92043e0. The LIT test SemaCXX/attr-trivial-abi.cpp is failing with 32bit build on Windows. All the

[PATCH] D119017: [clang] roll-forward "[clang] Mark `trivial_abi` types as "trivially relocatable"".

2022-03-22 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D119017#3400347 , @devin.jeanpierre wrote: > Please revert it, I don't have easy access to a Windows machine at work so am > struggling with the reproduction instructions. Thanks for letting us know! @Manna -- I'll let

[PATCH] D119017: [clang] roll-forward "[clang] Mark `trivial_abi` types as "trivially relocatable"".

2022-03-22 Thread Devin Jeanpierre via Phabricator via cfe-commits
devin.jeanpierre added a comment. Please revert it, I don't have easy access to a Windows machine at work so am struggling with the reproduction instructions. This has failed twice, and this time with a one month delay! Is there any way to run and confirm all tests pass before I try to merge ag

[PATCH] D119017: [clang] roll-forward "[clang] Mark `trivial_abi` types as "trivially relocatable"".

2022-03-22 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. Hello, @devin.jeanpierre! I'm wondering if we should revert this while you investigate the fix, or do you think you'll have this solved sometime today? Thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D119017/new

[PATCH] D119017: [clang] roll-forward "[clang] Mark `trivial_abi` types as "trivially relocatable"".

2022-03-18 Thread Soumi Manna via Phabricator via cfe-commits
Manna added a comment. In D119017#3392996 , @devin.jeanpierre wrote: > In D119017#3392993 , @Manna wrote: > lf so, what target triple, so that I can reproduce? (New to clang development...) >> >> You c

[PATCH] D119017: [clang] roll-forward "[clang] Mark `trivial_abi` types as "trivially relocatable"".

2022-03-18 Thread Devin Jeanpierre via Phabricator via cfe-commits
devin.jeanpierre added a comment. In D119017#3392993 , @Manna wrote: >>> lf so, what target triple, so that I can reproduce? (New to clang >>> development...) > > You can reproduce the test failure if you checkout 32 bit clang compiler. Please bear with

[PATCH] D119017: [clang] roll-forward "[clang] Mark `trivial_abi` types as "trivially relocatable"".

2022-03-18 Thread Soumi Manna via Phabricator via cfe-commits
Manna added a comment. In D119017#3392984 , @devin.jeanpierre wrote: > In D119017#3392961 , @Manna wrote: > >> LIT test (SemaCXX/attr-trivial-abi.cpp) is failing for x86 build of clang. >> The same failures are

[PATCH] D119017: [clang] roll-forward "[clang] Mark `trivial_abi` types as "trivially relocatable"".

2022-03-18 Thread Devin Jeanpierre via Phabricator via cfe-commits
devin.jeanpierre added a comment. In D119017#3392961 , @Manna wrote: > LIT test (SemaCXX/attr-trivial-abi.cpp) is failing for x86 build of clang. > The same failures are happening with our downstream X86 clang build. > [...] > The test might need to be u

[PATCH] D119017: [clang] roll-forward "[clang] Mark `trivial_abi` types as "trivially relocatable"".

2022-03-18 Thread Soumi Manna via Phabricator via cfe-commits
Manna added a comment. Herald added a project: All. LIT test (SemaCXX/attr-trivial-abi.cpp) is failing for x86 build of clang. The same failures are happening with our downstream X86 clang build. - TEST 'Clang :: SemaCXX/attr-trivial-abi.cpp' FAILED Script: --- : 'RUN:

[clang] 56d46b3 - [clang] roll-forward "[clang] Mark `trivial_abi` types as "trivially relocatable"".

2022-02-04 Thread Dmitri Gribenko via cfe-commits
.diff LOG: [clang] roll-forward "[clang] Mark `trivial_abi` types as "trivially relocatable"". This reverts commit 852afed5e0200b70047c28ccf4424a17089d17b0. Changes since D114732: On PS4, we reverse the expectation that classes whose constructor is deleted are not trivially

[PATCH] D119017: [clang] roll-forward "[clang] Mark `trivial_abi` types as "trivially relocatable"".

2022-02-04 Thread Dmitri Gribenko via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG56d46b36fc23: [clang] roll-forward "[clang] Mark `trivial_abi` types as "trivially… (authored by devin.jeanpierre, committed by

[PATCH] D119017: [clang] roll-forward "[clang] Mark `trivial_abi` types as "trivially relocatable"".

2022-02-04 Thread Dmitri Gribenko via Phabricator via cfe-commits
gribozavr2 accepted this revision. gribozavr2 added a comment. This revision is now accepted and ready to land. Approving the delta for the PS4 fix (relying or @rsmith 's approval for the actual patch -- https://reviews.llvm.org/D114732). Repository: rG LLVM Github Monorepo CHANGES SINCE LAS

[PATCH] D119017: [clang] roll-forward "[clang] Mark `trivial_abi` types as "trivially relocatable"".

2022-02-04 Thread Devin Jeanpierre via Phabricator via cfe-commits
{ + NontrivialMoveCtor(NontrivialMoveCtor&&) {} +}; +static_assert(!__is_trivially_relocatable(NontrivialMoveCtor), ""); +static_assert(!__is_trivially_relocatable(NontrivialMoveCtor[]), ""); + +struct [[clang::trivial_abi]] TrivialAbiNontrivialDtor { + ~Trivial

[PATCH] D114732: [clang] Mark `trivial_abi` types as "trivially relocatable".

2022-02-04 Thread Devin Jeanpierre via Phabricator via cfe-commits
devin.jeanpierre added a comment. The core difference of behavior is this, in the logic for setting `canPassInRegisters`: // Clang <= 4 used the pre-C++11 rule, which ignores move operations. // The PS4 platform ABI follows the behavior of Clang 3.2. if (CCK == TargetInfo::CCK_ClangABI4OrP

[PATCH] D114732: [clang] Mark `trivial_abi` types as "trivially relocatable".

2022-02-03 Thread Douglas Yung via Phabricator via cfe-commits
dyung added a comment. In D114732#3294794 , @devin.jeanpierre wrote: > Oops, sorry about that. What is the correct way to test/reproduce the change? > Do I / can I submit builds to the buildbot manually for testing? > > Also, should I be rolling back th

[PATCH] D114732: [clang] Mark `trivial_abi` types as "trivially relocatable".

2022-02-03 Thread Devin Jeanpierre via Phabricator via cfe-commits
devin.jeanpierre added a comment. Thank you @gribozavr2 ! I'll hopefully have a roll-forward ready for you either today or tomorrow. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D114732/new/ https://reviews.llvm.org/D114732 __

[PATCH] D114732: [clang] Mark `trivial_abi` types as "trivially relocatable".

2022-02-03 Thread Dmitri Gribenko via Phabricator via cfe-commits
gribozavr2 added a comment. I rolled it back while @devin.jeanpierre investigates. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D114732/new/ https://reviews.llvm.org/D114732 ___ cfe-commits mailing list

[clang] 852afed - Revert "[clang] Mark `trivial_abi` types as "trivially relocatable"."

2022-02-03 Thread Dmitri Gribenko via cfe-commits
.diff LOG: Revert "[clang] Mark `trivial_abi` types as "trivially relocatable"." This reverts commit 19aa2db023c0128913da223d4fb02c474541ee22. It breaks a PS4 buildbot. Added: Modified: clang/docs/LanguageExtensions.rst clang/include/clang/AST/Type.h clang

  1   2   3   >