[clang] [clang] Add some CodeGen tests for CWG 4xx issues (PR #83715)

2024-03-04 Thread Vlad Serebrennikov via cfe-commits
@@ -0,0 +1,27 @@ +// RUN: %clang_cc1 -std=c++98 %s -triple x86_64-linux-gnu -emit-llvm -o - -fexceptions -fcxx-exceptions -pedantic-errors | llvm-cxxfilt -n | FileCheck %s --check-prefixes CHECK +// RUN: %clang_cc1 -std=c++11 %s -triple x86_64-linux-gnu -emit-llvm -o -

[clang] [Clang] [Sema] Do not attempt to dump the layout of dependent types when `-fdump-record-layouts-complete` is passed (PR #83688)

2024-03-04 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: > Apparently, buildbot is mad at me > (https://lab.llvm.org/buildbot/#/builders/165/builds/49741)? > > I’m not entirely sure how a fix that affects only > -fdump-record-layouts-complete could have caused this. Is this a spurious > failure or due to something unrelated, or is it

[clang] [clang][AST] fix dereference on class/struct layouts check. (PR #83686)

2024-03-03 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: I posted a different, even shorter reduction in https://github.com/llvm/llvm-project/issues/83671. https://github.com/llvm/llvm-project/pull/83686 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [Clang] [Sema] Do not attempt to dump the layout of dependent types when `-fdump-record-layouts-complete` is passed (PR #83688)

2024-03-03 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: This might also fix #83671 https://github.com/llvm/llvm-project/pull/83688 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Add some CodeGen tests for CWG 4xx issues (PR #83715)

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

[clang] [clang] Add some CodeGen tests for CWG 4xx issues (PR #83715)

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

[clang] [clang] Add some CodeGen tests for CWG 4xx issues (PR #83715)

2024-03-03 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll created https://github.com/llvm/llvm-project/pull/83715 This patch covers the following defect reports: [CWG438](https://cplusplus.github.io/CWG/issues/438.html) "Possible flaw in wording for multiple accesses to object between sequence points",

[clang] [clang] Bugfix for choosing the more specialized overload (PR #83279)

2024-03-01 Thread Vlad Serebrennikov via cfe-commits
Botond =?utf-8?q?István_Horváth?=,Botond Istvan Horvath ,Botond Istvan Horvath ,Botond Istvan Horvath ,Botond Istvan Horvath Message-ID: In-Reply-To: Endilll wrote: > I have added tests to other files what are relevant for the DR too. Should I > move them here? I trust your judgement

[clang] [clang] Bugfix for choosing the more specialized overload (PR #83279)

2024-03-01 Thread Vlad Serebrennikov via cfe-commits
Botond =?utf-8?q?István_Horváth?=,Botond Istvan Horvath ,Botond Istvan Horvath ,Botond Istvan Horvath ,Botond Istvan Horvath Message-ID: In-Reply-To: https://github.com/Endilll approved this pull request. DR changes looks good now, save for a nitpick. However, I'm leaving it to other

[clang] [clang] Bugfix for choosing the more specialized overload (PR #83279)

2024-03-01 Thread Vlad Serebrennikov via cfe-commits
Botond =?utf-8?q?Istv=C3=A1n_Horv=C3=A1th?=,Botond Istvan Horvath ,Botond Istvan Horvath ,Botond Istvan Horvath ,Botond Istvan Horvath Message-ID: In-Reply-To: @@ -68,3 +68,35 @@ template struct X {}; X<1> x; #endif } +namespace dr2445 { // dr2445: 19

[clang] [clang] Bugfix for choosing the more specialized overload (PR #83279)

2024-03-01 Thread Vlad Serebrennikov via cfe-commits
Botond =?utf-8?q?István_Horváth?=,Botond Istvan Horvath ,Botond Istvan Horvath ,Botond Istvan Horvath ,Botond Istvan Horvath Message-ID: In-Reply-To: https://github.com/Endilll edited https://github.com/llvm/llvm-project/pull/83279 ___

[clang] [clang] Bugfix for choosing the more specialized overload (PR #83279)

2024-03-01 Thread Vlad Serebrennikov via cfe-commits
Botond =?utf-8?q?István_Horváth?=,Botond Istvan Horvath ,Botond Istvan Horvath ,Botond Istvan Horvath Message-ID: In-Reply-To: @@ -14478,7 +14478,7 @@ C++ defect report implementation status https://cplusplus.github.io/CWG/issues/2445.html;>2445 C++20

[clang] Fix implementation of [temp.param]p14's first sentence. (PR #83487)

2024-03-01 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: My plan is to add tests to this PR, but if you want to land this sooner, I can do tests in a separate PR. https://github.com/llvm/llvm-project/pull/83487 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [clang] Bugfix for choosing the more specialized overload (PR #83279)

2024-03-01 Thread Vlad Serebrennikov via cfe-commits
Botond =?utf-8?q?István_Horváth?=,Botond Istvan Horvath ,Botond Istvan Horvath ,Botond Istvan Horvath Message-ID: In-Reply-To: @@ -14478,7 +14478,7 @@ C++ defect report implementation status https://cplusplus.github.io/CWG/issues/2445.html;>2445 C++20

[clang] [clang] Bugfix for choosing the more specialized overload (PR #83279)

2024-03-01 Thread Vlad Serebrennikov via cfe-commits
Botond =?utf-8?q?Istv=C3=A1n_Horv=C3=A1th?=,Botond Istvan Horvath ,Botond Istvan Horvath ,Botond Istvan Horvath Message-ID: In-Reply-To: https://github.com/Endilll requested changes to this pull request. https://github.com/llvm/llvm-project/pull/83279

[clang] [clang] Bugfix for choosing the more specialized overload (PR #83279)

2024-03-01 Thread Vlad Serebrennikov via cfe-commits
Botond =?utf-8?q?István_Horváth?=,Botond Istvan Horvath ,Botond Istvan Horvath ,Botond Istvan Horvath Message-ID: In-Reply-To: https://github.com/Endilll edited https://github.com/llvm/llvm-project/pull/83279 ___ cfe-commits mailing list

[clang] [Clang][Sema]: Diagnose lambda to bool implicit casts (PR #83152)

2024-02-28 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll approved this pull request. DR test changes look good, save for a nit. https://github.com/llvm/llvm-project/pull/83152 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [Clang][Sema]: Diagnose lambda to bool implicit casts (PR #83152)

2024-02-28 Thread Vlad Serebrennikov via cfe-commits
@@ -281,7 +281,7 @@ namespace dr1837 { // dr1837: 3.3 struct A { int f(); -bool b = [] { +bool b = [] { // since-cxx11-warning{{address of lambda function pointer conversion operator will always evaluate to 'true'}} Endilll wrote: Convert this

[clang] [Clang][Sema]: Diagnose lambda to bool implicit casts (PR #83152)

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

[clang] [Clang][Sema]: Diagnose lambda to bool implicit casts (PR #83152)

2024-02-28 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll requested changes to this pull request. https://github.com/llvm/llvm-project/pull/83152 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Sema]: Diagnose lambda to bool implicit casts (PR #83152)

2024-02-28 Thread Vlad Serebrennikov via cfe-commits
@@ -287,6 +287,11 @@ namespace dr1837 { // dr1837: 3.3 }; }; }; + /* since-cxx11-warning@-6{{address of function '[] { Endilll wrote: Can you convert this to use a marker? We don't want readers to count relative offsets. In other words, it

[clang] [Clang][Sema]: Diagnose lambda to bool implicit casts (PR #83152)

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

[clang] [clang] Implement CWG2759 "`[[no_unique_address]` and common initial sequence" (PR #82607)

2024-02-22 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll closed https://github.com/llvm/llvm-project/pull/82607 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Implement CWG2759 "`[[no_unique_address]` and common initial sequence" (PR #82607)

2024-02-22 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/82607 >From 22facf44ec3f97fcdc40f2431ec26ca7ef441c67 Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Thu, 22 Feb 2024 13:28:04 +0300 Subject: [PATCH 1/6] [clang] Implement CWG2759 "`[[no_unique_address]` and

[clang] [clang] Implement CWG2759 "`[[no_unique_address]` and common initial sequence" (PR #82607)

2024-02-22 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/82607 >From 22facf44ec3f97fcdc40f2431ec26ca7ef441c67 Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Thu, 22 Feb 2024 13:28:04 +0300 Subject: [PATCH 1/5] [clang] Implement CWG2759 "`[[no_unique_address]` and

[clang] [clang] Implement CWG2759 "`[[no_unique_address]` and common initial sequence" (PR #82607)

2024-02-22 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/82607 >From 22facf44ec3f97fcdc40f2431ec26ca7ef441c67 Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Thu, 22 Feb 2024 13:28:04 +0300 Subject: [PATCH 1/4] [clang] Implement CWG2759 "`[[no_unique_address]` and

[clang] [clang] Implement CWG2759 "`[[no_unique_address]` and common initial sequence" (PR #82607)

2024-02-22 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/82607 >From 22facf44ec3f97fcdc40f2431ec26ca7ef441c67 Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Thu, 22 Feb 2024 13:28:04 +0300 Subject: [PATCH 1/3] [clang] Implement CWG2759 "`[[no_unique_address]` and

[clang] [clang] Implement CWG2759 "`[[no_unique_address]` and common initial sequence" (PR #82607)

2024-02-22 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/82607 >From 22facf44ec3f97fcdc40f2431ec26ca7ef441c67 Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Thu, 22 Feb 2024 13:28:04 +0300 Subject: [PATCH 1/2] [clang] Implement CWG2759 "`[[no_unique_address]` and

[clang] [clang] Implement CWG2759 "`[[no_unique_address]` and common initial sequence" (PR #82607)

2024-02-22 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll created https://github.com/llvm/llvm-project/pull/82607 This patch implements said defect report resolution by adding additional check to common initial sequence evaluation. Consequently, this fixes CWG2759. No special handling of `[[msvc::no_unique_address]]` is

[clang] [clang][NFC] Regroup declarations in `Sema` (PR #82217)

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

[clang] [clang][NFC] Regroup declarations in `Sema` (PR #82217)

2024-02-21 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: Funny enough, search in the web versions shows only 23 PRs: https://github.com/llvm/llvm-project/pulls?q=is%3Apr+is%3Aopen+%22clang%2Finclude%2Fclang%2FSema%2FSema.h%22 https://github.com/llvm/llvm-project/pull/82217 ___ cfe-commits

[clang] [clang] Implement CWG1719 "Layout compatibility and cv-qualification revisited" (PR #82358)

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

[clang] [clang] Implement CWG1719 "Layout compatibility and cv-qualification revisited" (PR #82358)

2024-02-21 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/82358 >From 15d9428a47ea5d7ba3b4ffd2e766406b16d781e0 Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Tue, 20 Feb 2024 16:44:04 +0300 Subject: [PATCH 1/3] [clang] Implement CWG1719 "Layout compatibility and

[clang] [clang] Implement CWG1719 "Layout compatibility and cv-qualification revisited" (PR #82358)

2024-02-20 Thread Vlad Serebrennikov via cfe-commits
@@ -1711,13 +1711,13 @@ void is_layout_compatible(int n) { static_assert(__is_layout_compatible(void, void), ""); static_assert(!__is_layout_compatible(void, int), ""); - static_assert(!__is_layout_compatible(void, const void), ""); // FIXME: this is CWG1719 -

[clang] [clang] Implement CWG1719 "Layout compatibility and cv-qualification revisited" (PR #82358)

2024-02-20 Thread Vlad Serebrennikov via cfe-commits
@@ -120,6 +119,10 @@ Resolutions to C++ Defect Reports in the template parameters, but is deduced from a previous argument. (`#78449: `_). +- ``const`` and ``volatile`` qualifiers are now ignored when evaluating

[clang] [clang] Implement CWG1719 "Layout compatibility and cv-qualification revisited" (PR #82358)

2024-02-20 Thread Vlad Serebrennikov via cfe-commits
@@ -120,6 +119,10 @@ Resolutions to C++ Defect Reports in the template parameters, but is deduced from a previous argument. (`#78449: `_). +- ``const`` and ``volatile`` qualifiers are now ignored when evaluating

[clang] [clang] Implement CWG1719 "Layout compatibility and cv-qualification revisited" (PR #82358)

2024-02-20 Thread Vlad Serebrennikov via cfe-commits
@@ -66,11 +66,10 @@ struct CStructWithQualifiers { static_assert(__is_layout_compatible(CStruct, const CStruct2), ""); static_assert(__is_layout_compatible(CStruct, volatile CStruct2), ""); static_assert(__is_layout_compatible(const CStruct, volatile CStruct2), ""); -// FIXME:

[clang] [clang] Implement CWG1719 "Layout compatibility and cv-qualification revisited" (PR #82358)

2024-02-20 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/82358 >From 15d9428a47ea5d7ba3b4ffd2e766406b16d781e0 Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Tue, 20 Feb 2024 16:44:04 +0300 Subject: [PATCH 1/3] [clang] Implement CWG1719 "Layout compatibility and

[clang] [clang][NFC] Regroup declarations in `Sema` (PR #82217)

2024-02-20 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: @erichkeane > That said, waiting until after 18 is perhaps a good diea. Resolving merge conflicts that will arise in the meantime is not going to be trivial, but should be doable in a reasonable time. So I'm willing to wait. > I MIGHT suggest private followed by public? It is

[clang] [clang][NFC] Regroup declarations in `Sema` (PR #82217)

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

[clang] [clang][NFC] Regroup declarations in `Sema` (PR #82217)

2024-02-20 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: That's how API reference looks with this patch. I specifically picked small groups to showcase member grouping. ![image](https://github.com/llvm/llvm-project/assets/12883766/620d2da6-233c-436d-9ed7-a60b2192d1bb) Existing API reference can be found here:

[clang] [clang] Implement CWG1719 "Layout compatibility and cv-qualification revisited" (PR #82358)

2024-02-20 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll created https://github.com/llvm/llvm-project/pull/82358 This patch updates our internal notion of `layout-compatible`, which in turn fixes `__is_layout_compatible` intrinsic. >From 15d9428a47ea5d7ba3b4ffd2e766406b16d781e0 Mon Sep 17 00:00:00 2001 From: Vlad

[clang] [clang] Implement `__is_layout_compatible` (PR #81506)

2024-02-20 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll closed https://github.com/llvm/llvm-project/pull/81506 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Implement `__is_layout_compatible` (PR #81506)

2024-02-19 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/81506 >From 52b239153b2fc4f52e889ad2044daa6ed5cbc836 Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Mon, 12 Feb 2024 17:44:38 +0300 Subject: [PATCH 01/15] Initial implementation ---

[clang] [clang] Implement `__is_layout_compatible` (PR #81506)

2024-02-19 Thread Vlad Serebrennikov via cfe-commits
@@ -90,6 +90,12 @@ C++20 Feature Support behavior can use the flag '-Xclang -fno-skip-odr-check-in-gmf'. (`#79240 `_). +- Implemented `__is_layout_compatible` intrinsic, which backs up + `P0466R5: Layout-compatibility

[clang] [clang] Implement `__is_layout_compatible` (PR #81506)

2024-02-19 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/81506 >From 52b239153b2fc4f52e889ad2044daa6ed5cbc836 Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Mon, 12 Feb 2024 17:44:38 +0300 Subject: [PATCH 01/14] Initial implementation ---

[clang] [clang] Implement `__is_layout_compatible` (PR #81506)

2024-02-19 Thread Vlad Serebrennikov via cfe-commits
@@ -1558,6 +1558,89 @@ void is_standard_layout() int t71[F(__is_standard_layout(HasEmptyIndirectBaseAsSecondUnionMember))]; } +struct CStruct2 { + int one; + int two; +}; + +struct CEmptyStruct2 {}; + +struct CppEmptyStruct2 : CStruct2 {}; +struct CppStructStandard2 :

[clang] [clang] Implement `__is_layout_compatible` (PR #81506)

2024-02-19 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/81506 >From 52b239153b2fc4f52e889ad2044daa6ed5cbc836 Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Mon, 12 Feb 2024 17:44:38 +0300 Subject: [PATCH 01/13] Initial implementation ---

[clang] [clang] Implement `__is_layout_compatible` (PR #81506)

2024-02-19 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/81506 >From 52b239153b2fc4f52e889ad2044daa6ed5cbc836 Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Mon, 12 Feb 2024 17:44:38 +0300 Subject: [PATCH 01/12] Initial implementation ---

[clang] [clang][NFC] Regroup declarations in `Sema` (PR #82217)

2024-02-18 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: I've built doxygen documentation locally. Now I see what I expected so see (proper member groups). https://github.com/llvm/llvm-project/pull/82217 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [clang][NFC] Regroup declarations in `Sema` (PR #82217)

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

[clang] [clang][NFC] Regroup declarations in `Sema` (PR #82217)

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

[clang] [clang][NFC] Regroup declarations in `Sema` (PR #82217)

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

[clang] [clang][NFC] Regroup declarations in `Sema` (PR #82217)

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

[clang] [clang] Implement `__is_layout_compatible` (PR #81506)

2024-02-17 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/81506 >From 52b239153b2fc4f52e889ad2044daa6ed5cbc836 Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Mon, 12 Feb 2024 17:44:38 +0300 Subject: [PATCH 01/11] Initial implementation ---

[clang] [clang] Implement `__is_layout_compatible` (PR #81506)

2024-02-17 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/81506 >From 52b239153b2fc4f52e889ad2044daa6ed5cbc836 Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Mon, 12 Feb 2024 17:44:38 +0300 Subject: [PATCH 01/10] Initial implementation ---

[clang] [clang] Implement `__is_layout_compatible` (PR #81506)

2024-02-16 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/81506 >From 52b239153b2fc4f52e889ad2044daa6ed5cbc836 Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Mon, 12 Feb 2024 17:44:38 +0300 Subject: [PATCH 1/9] Initial implementation ---

[clang] [clang] Implement `__is_layout_compatible` (PR #81506)

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

[clang] [clang] Implement `__is_layout_compatible` (PR #81506)

2024-02-16 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/81506 >From 52b239153b2fc4f52e889ad2044daa6ed5cbc836 Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Mon, 12 Feb 2024 17:44:38 +0300 Subject: [PATCH 1/8] Initial implementation ---

[clang] [clang] Implement `__is_layout_compatible` (PR #81506)

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

[clang] [clang] Implement `__is_layout_compatible` (PR #81506)

2024-02-16 Thread Vlad Serebrennikov via cfe-commits
@@ -1558,6 +1558,89 @@ void is_standard_layout() int t71[F(__is_standard_layout(HasEmptyIndirectBaseAsSecondUnionMember))]; } +struct CStruct2 { + int one; + int two; +}; + +struct CEmptyStruct2 {}; + +struct CppEmptyStruct2 : CStruct2 {}; +struct CppStructStandard2 :

[clang] [clang] Do less advertising for unresolved issues in `cxx_dr_status.html` (PR #78836)

2024-02-15 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll closed https://github.com/llvm/llvm-project/pull/78836 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Do less advertising for unresolved issues in `cxx_dr_status.html` (PR #78836)

2024-02-15 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: Windows CI didn't pass due to unrelated test failure. Landing. https://github.com/llvm/llvm-project/pull/78836 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Do less advertising for unresolved issues in `cxx_dr_status.html` (PR #78836)

2024-02-15 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/78836 >From c931f87fdabe83e1e3507f0e52ebb3201a41cb82 Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Sat, 20 Jan 2024 12:04:32 +0300 Subject: [PATCH 1/5] [clang] Stop reporting unresolved issues in

[clang] 8bda8cf - [clang][NFC] Fix buildbot failure in drs/23xx.cpp

2024-02-15 Thread Vlad Serebrennikov via cfe-commits
Author: Vlad Serebrennikov Date: 2024-02-15T20:58:44+03:00 New Revision: 8bda8cfae6aa3c32cca7997ab64771e6a78f3e61 URL: https://github.com/llvm/llvm-project/commit/8bda8cfae6aa3c32cca7997ab64771e6a78f3e61 DIFF:

[clang] 630548a - [clang][NFC] Keep the order of DRs in dr23xx.cpp

2024-02-15 Thread Vlad Serebrennikov via cfe-commits
Author: Vlad Serebrennikov Date: 2024-02-15T18:41:44+03:00 New Revision: 630548a11423a40c5496cec78001374bfb8ff741 URL: https://github.com/llvm/llvm-project/commit/630548a11423a40c5496cec78001374bfb8ff741 DIFF:

[clang] [clang] Do less advertising for unresolved issues in `cxx_dr_status.html` (PR #78836)

2024-02-15 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/78836 >From c931f87fdabe83e1e3507f0e52ebb3201a41cb82 Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Sat, 20 Jan 2024 12:04:32 +0300 Subject: [PATCH 1/5] [clang] Stop reporting unresolved issues in

[clang] [clang] Do less advertising for unresolved issues in `cxx_dr_status.html` (PR #78836)

2024-02-15 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/78836 >From c931f87fdabe83e1e3507f0e52ebb3201a41cb82 Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Sat, 20 Jan 2024 12:04:32 +0300 Subject: [PATCH 1/4] [clang] Stop reporting unresolved issues in

[clang] [clang][NFC] Use "notable" for "interesting" identifiers in `IdentifierInfo` (PR #81542)

2024-02-14 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll closed https://github.com/llvm/llvm-project/pull/81542 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][NFC] Use "notable" for "interesting" identifiers in `IdentifierInfo` (PR #81542)

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

[clang] [clang] Implement `__is_layout_compatible` (PR #81506)

2024-02-13 Thread Vlad Serebrennikov via cfe-commits
@@ -1717,6 +1717,7 @@ void Parser::ParseClassSpecifier(tok::TokenKind TagTokKind, tok::kw___is_fundamental, tok::kw___is_integral, tok::kw___is_interface_class, + tok::kw___is_layout_compatible, Endilll wrote: Done

[clang] [clang] Implement `__is_layout_compatible` (PR #81506)

2024-02-13 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/81506 >From 52b239153b2fc4f52e889ad2044daa6ed5cbc836 Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Mon, 12 Feb 2024 17:44:38 +0300 Subject: [PATCH 1/6] Initial implementation ---

[clang] [clang] Add some CodeGen tests for CWG 2xx issues (PR #80823)

2024-02-13 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll closed https://github.com/llvm/llvm-project/pull/80823 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Implement `__is_layout_compatible` (PR #81506)

2024-02-13 Thread Vlad Serebrennikov via cfe-commits
@@ -14040,6 +14040,8 @@ class Sema final { bool SemaValueIsRunOfOnes(CallExpr *TheCall, unsigned ArgNum); public: + bool SemaIsLayoutCompatible(QualType T1, QualType T2); Endilll wrote: Done https://github.com/llvm/llvm-project/pull/81506

[clang] [clang] Implement `__is_layout_compatible` (PR #81506)

2024-02-13 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/81506 >From 52b239153b2fc4f52e889ad2044daa6ed5cbc836 Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Mon, 12 Feb 2024 17:44:38 +0300 Subject: [PATCH 1/5] Initial implementation ---

[clang] [clang] Do less advertising for unresolved issues in `cxx_dr_status.html` (PR #78836)

2024-02-13 Thread Vlad Serebrennikov via cfe-commits
@@ -159,21 +165,37 @@ def availability(issue): if status == 'unknown': avail = 'Unknown' avail_style = ' class="unknown"' - elif re.match('^[0-9]+\.?[0-9]*', status): -avail = 'Clang %s' % status -if float(status) > latest_release: - avail_style = '

[clang] [clang] Do less advertising for unresolved issues in `cxx_dr_status.html` (PR #78836)

2024-02-13 Thread Vlad Serebrennikov via cfe-commits
@@ -159,21 +165,37 @@ def availability(issue): if status == 'unknown': avail = 'Unknown' avail_style = ' class="unknown"' - elif re.match('^[0-9]+\.?[0-9]*', status): -avail = 'Clang %s' % status -if float(status) > latest_release: - avail_style = '

[clang] [clang] Use "notable" for "interesting" identifiers in `IdentifierInfo` (PR #81542)

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

[clang] [clang] Add some CodeGen tests for CWG 2xx issues (PR #80823)

2024-02-12 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/80823 >From 560713b5d45236956198654a10e0795eb56cad7b Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Tue, 6 Feb 2024 13:23:36 +0300 Subject: [PATCH 1/4] [Clang] Add some CodeGen tests for CWG 2xx issues This

[clang] [clang] Remove #undef alloca workaround (PR #81534)

2024-02-12 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll approved this pull request. Thank you for your time to fix that `-fPIE` failure caused by my PR! https://github.com/llvm/llvm-project/pull/81534 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [clang] Use "notable" for "interesting" identifiers in `IdentifierInfo` (PR #81542)

2024-02-12 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll created https://github.com/llvm/llvm-project/pull/81542 This patch expands notion of "interesting" in `IdentifierInto` it to also cover ObjC keywords and builtins, which matches noting of "interesting" in serialization layer. What was previously "interesting" in

[clang] [clang] Remove old Linux kernel workaround for ensuring stack space (PR #81533)

2024-02-12 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll approved this pull request. https://github.com/llvm/llvm-project/pull/81533 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Refactor `IdentifierInfo::ObjcOrBuiltinID` (PR #71709)

2024-02-12 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: @aeubanks Thank you reporting! I'll take a look momentarily https://github.com/llvm/llvm-project/pull/71709 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Add some CodeGen tests for CWG 1xx issues (PR #80338)

2024-02-12 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll closed https://github.com/llvm/llvm-project/pull/80338 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Add some CodeGen tests for CWG 2xx issues (PR #80823)

2024-02-12 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/80823 >From 560713b5d45236956198654a10e0795eb56cad7b Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Tue, 6 Feb 2024 13:23:36 +0300 Subject: [PATCH 1/4] [Clang] Add some CodeGen tests for CWG 2xx issues This

[clang] [clang] Implement `__is_layout_compatible` (PR #81506)

2024-02-12 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: Formatting suggestions to `ParseDeclCXX.cpp` are too disruptive. I'm not going to commit them. https://github.com/llvm/llvm-project/pull/81506 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [clang] Implement `__is_layout_compatible` (PR #81506)

2024-02-12 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/81506 >From 52b239153b2fc4f52e889ad2044daa6ed5cbc836 Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Mon, 12 Feb 2024 17:44:38 +0300 Subject: [PATCH 1/3] Initial implementation ---

[clang] [clang] Implement `__is_layout_compatible` (PR #81506)

2024-02-12 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll created https://github.com/llvm/llvm-project/pull/81506 This patch implements `__is_layout_compatible`, which backs up `std::is_layout_compatible` type trait introduced in C++20 ([P0466R5](https://wg21.link/p0466r5) "Layout-compatibility and

[clang] [clang] Add some CodeGen tests for CWG 1xx issues (PR #80338)

2024-02-12 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/80338 >From 9c434c59a1b09a3d1217bbab4e44112a92bf6360 Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Thu, 1 Feb 2024 23:44:53 +0300 Subject: [PATCH 1/2] [clang] Add some CodeGen tests for CWG 1xx issues

[clang] [clang][NFC] Refactor `Sema::TemplateDeductionResult` (PR #81398)

2024-02-12 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll closed https://github.com/llvm/llvm-project/pull/81398 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Refactor `IdentifierInfo::ObjcOrBuiltinID` (PR #71709)

2024-02-12 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll closed https://github.com/llvm/llvm-project/pull/71709 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][NFC] Refactor `Sema::TemplateDeductionResult` (PR #81398)

2024-02-12 Thread Vlad Serebrennikov via cfe-commits
@@ -33,6 +33,7 @@ namespace clang { class Decl; struct DeducedPack; class Sema; +enum class TemplateDeductionResult; Endilll wrote: This is far from the first time we do unscoped enum → scoped enum refactoring so that we can forward declare enums. Me and

[clang] [clang][NFC] Refactor `Sema::TemplateDeductionResult` (PR #81398)

2024-02-12 Thread Vlad Serebrennikov via cfe-commits
@@ -11445,11 +11452,16 @@ static void DiagnoseBadDeduction(Sema , NamedDecl *Found, Decl *Templated, (ParamD = Param.dyn_cast()) || (ParamD = Param.dyn_cast()) || (ParamD = Param.dyn_cast()); - switch (DeductionFailure.Result) { - case Sema::TDK_Success: -

[clang] e3f684d - [clang][NFC] Refactor bit-fields in `DefaultedFunctionKind`

2024-02-11 Thread Vlad Serebrennikov via cfe-commits
Author: Vlad Serebrennikov Date: 2024-02-11T17:27:31+03:00 New Revision: e3f684d86b308bc2576d813aad1a230aa6b295ab URL: https://github.com/llvm/llvm-project/commit/e3f684d86b308bc2576d813aad1a230aa6b295ab DIFF:

[clang] 082439c - [clang][NFC] Refactor bit-fields in `ObjCAtTryStmt`

2024-02-11 Thread Vlad Serebrennikov via cfe-commits
Author: Vlad Serebrennikov Date: 2024-02-11T16:40:15+03:00 New Revision: 082439c33fa76ad4df267600472695d24ad53821 URL: https://github.com/llvm/llvm-project/commit/082439c33fa76ad4df267600472695d24ad53821 DIFF:

[clang] 1503db8 - [clang][NFC] Refactor bit-fields in `RawComment`

2024-02-11 Thread Vlad Serebrennikov via cfe-commits
Author: Vlad Serebrennikov Date: 2024-02-11T16:29:17+03:00 New Revision: 1503db86d65ee2bcc8ec1c2a5a4d00dea02aae0d URL: https://github.com/llvm/llvm-project/commit/1503db86d65ee2bcc8ec1c2a5a4d00dea02aae0d DIFF:

[clang] 8033749 - [clang][NFC] Annotate `DiagnosticID.cpp` with `preferred_type`

2024-02-11 Thread Vlad Serebrennikov via cfe-commits
Author: Vlad Serebrennikov Date: 2024-02-11T15:48:52+03:00 New Revision: 803374994602910aae2cb483d03bcbdb294b21bb URL: https://github.com/llvm/llvm-project/commit/803374994602910aae2cb483d03bcbdb294b21bb DIFF:

[clang] 4bbae06 - [clang][NFC] Annotate `RISCVVIntrinsicUtils.h` with `preferred_type`

2024-02-11 Thread Vlad Serebrennikov via cfe-commits
Author: Vlad Serebrennikov Date: 2024-02-11T15:43:35+03:00 New Revision: 4bbae068d704752acbd7c5d8652c11b0954742be URL: https://github.com/llvm/llvm-project/commit/4bbae068d704752acbd7c5d8652c11b0954742be DIFF:

[clang] 23bdca2 - [clang][NFC] Annotate `RISCVVEmitter.cpp` with `preferred_type`

2024-02-11 Thread Vlad Serebrennikov via cfe-commits
Author: Vlad Serebrennikov Date: 2024-02-11T15:41:49+03:00 New Revision: 23bdca2c6737f25f1d184f03021f61157bac6196 URL: https://github.com/llvm/llvm-project/commit/23bdca2c6737f25f1d184f03021f61157bac6196 DIFF:

[clang] bc1d61c - [clang][NFC] Annotate `SourceManagerTest.cpp` with `preferred_type`

2024-02-11 Thread Vlad Serebrennikov via cfe-commits
Author: Vlad Serebrennikov Date: 2024-02-11T15:27:21+03:00 New Revision: bc1d61cbf8759f5144217af50d2309b55538 URL: https://github.com/llvm/llvm-project/commit/bc1d61cbf8759f5144217af50d2309b55538 DIFF:

<    1   2   3   4   5   6   7   8   9   10   >