[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/include/clang/Basic/T

[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/9] Initial implementation --- clang/include/clang/Basic/T

[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/include/clang/Basic

[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/include/clang/Basic

[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][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 https://lists.llvm.org/cgi-bin/ma

[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/include/clang/Basic

[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/include/clang/Basic

[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 : CEmp

[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/include/clang/Basic

[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 and

[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/include/clang/Basic

[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 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 Serebrenn

[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: https://clang.llvm.org/dox

[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: @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] 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 cv-

[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
@@ -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
@@ -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 - static_ass

[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 cv-

[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][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 mai

[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] 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 per

[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 c

[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 c

[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 c

[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 c

[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 c

[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] Move the builtin workaround logic to the lexer (PR #96097)

2024-06-29 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/96097 >From b77b2d9b10ad90ee67893904732003bf11eec21d Mon Sep 17 00:00:00 2001 From: Corentin Jabot Date: Wed, 19 Jun 2024 19:47:43 +0200 Subject: [PATCH 1/5] [Clang] Move the builtin workaround logic to the lexer ---

[clang] [Clang] Move the builtin workaround logic to the lexer (PR #96097)

2024-06-29 Thread Vlad Serebrennikov via cfe-commits
@@ -1673,6 +1673,7 @@ void Preprocessor::ExpandBuiltinMacro(Token &Tok) { return II && HasExtension(*this, II->getName()); }); } else if (II == Ident__has_builtin) { +EvaluatingHasBuiltinMacro = true; Endilll wrote: I'm not particularly pro

[clang] [clang] Warn when builtin names are used outside of invocations (PR #96097)

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

[clang] [clang] Warn when builtin names are used outside of invocations (PR #96097)

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

[clang] [clang] Warn when builtin names are used outside of invocations (PR #96097)

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

[clang] [clang] Warn when builtin names are used outside of invocations (PR #96097)

2024-06-29 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: CC @MitalAshok https://github.com/llvm/llvm-project/pull/96097 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Warn when builtin names are used outside of invocations (PR #96097)

2024-06-29 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: To clear potential confusion, Corentin suggested to me offline to take over this PR. I fixed the tests and implemented the workaround for `__has_builtin` case, which surfaced while I was fixing the tests. https://github.com/llvm/llvm-project/pull/96097 __

[clang] [clang][NFC] Move more functions from `Sema` to `SemaObjC` (PR #97172)

2024-06-29 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll created https://github.com/llvm/llvm-project/pull/97172 This patch continues the effort to split `Sema` up, moving more function to `SemaObjC`. Additional context can be found in https://github.com/llvm/llvm-project/pull/84184 and https://github.com/llvm/llvm-projec

[clang] [clang] Warn when builtin names are used outside of invocations (PR #96097)

2024-06-29 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: > Looks like !__is_identifier() is used instead of > __has_builtin sometimes. With this patch, __is_identifier( trait name>) is true because there's no lparen after the name Thank you, I'll make `__is_identifier` work. > Apparantly __has_feature(__is_abstract) is also supposed t

[clang] [clang] Warn when builtin names are used outside of invocations (PR #96097)

2024-06-29 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: @zygoloid @cor3ntin @AaronBallman in the light of new data in https://github.com/llvm/llvm-project/pull/96097#issuecomment-2198314023, do you think this lex approach to revertible type trait identifiers is still viable? https://github.com/llvm/llvm-project/pull/96097 ___

[clang] [clang] Warn when builtin names are used outside of invocations (PR #96097)

2024-06-29 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: ``` /usr/lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/bits/uniform_int_dist.h:250:31: error: expected unqualified-id static_assert(!_Up_traits::__is_signed, "U must be unsigned"); ``` Results from CI are not making this any better. https://github.com/llvm/llvm

[clang] [NFC] [Clang] Some core issues have changed status from tentatively ready -> ready / review (PR #97200)

2024-06-30 Thread Vlad Serebrennikov via cfe-commits
@@ -150,7 +150,7 @@ void g() { #endif } // namespace cwg2877 -namespace cwg2881 { // cwg2881: 19 tentatively ready 2024-04-19 +namespace cwg2881 { // cwg2881: 19 ready 2024-04-19 Endilll wrote: Since this was added, wording has changed slightly, and a new ill

[clang] [NFC] [Clang] Some core issues have changed status from tentatively ready -> ready / review (PR #97200)

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

[clang] [NFC] [Clang] Some core issues have changed status from tentatively ready -> ready / review (PR #97200)

2024-06-30 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll requested changes to this pull request. Thank you for taking care of this! But I'd like to emphasize that updating statuses of existing DR tests is not just a menial task, otherwise I wouldn't even bother making the script this strict about statuses in the first place

[clang] [NFC] [Clang] Some core issues have changed status from tentatively ready -> ready / review (PR #97200)

2024-06-30 Thread Vlad Serebrennikov via cfe-commits
@@ -134,7 +134,7 @@ struct A { } // namespace cwg2858 -namespace cwg2877 { // cwg2877: 19 tentatively ready 2024-05-31 +namespace cwg2877 { // cwg2877: 19 ready 2024-05-31 Endilll wrote: We should fix the comments as it was done in https://github.com/cplusp

[clang] [libclang/python] Refactor enum usage (PR #95608)

2024-07-01 Thread Vlad Serebrennikov via cfe-commits
@@ -10,26 +10,6 @@ class TestTokenKind(unittest.TestCase): -def test_constructor(self): Endilll wrote: Can't we keep those tests? https://github.com/llvm/llvm-project/pull/95608 ___ cfe-commits mailing list cf

[clang] [libclang/python] Refactor enum usage (PR #95608)

2024-07-01 Thread Vlad Serebrennikov via cfe-commits
@@ -10,26 +10,6 @@ class TestTokenKind(unittest.TestCase): -def test_constructor(self): Endilll wrote: > test_constructor: this tests the ability to add enum variants "on the fly", > which is not possible with the Python stdlib's Enum class Do we have

[clang] [clang][Sema] Add support for OpenBSD's syslog format attribute (PR #97366)

2024-07-02 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll commented: `Sema.h` changes look good. https://github.com/llvm/llvm-project/pull/97366 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Sema] Fix crash in Sema::FindInstantiatedDecl (PR #96509)

2024-07-03 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll commented: Makes sense to me, but wait for other reviewers. You published this PR on the first day of WG21 meeting, so it didn't get the usual amount of attention. https://github.com/llvm/llvm-project/pull/96509 ___ cfe-comm

[clang] [clang] Implement P3144R2 "Deleting a Pointer to an Incomplete Type..." (PR #97733)

2024-07-04 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll created https://github.com/llvm/llvm-project/pull/97733 This patch implements (not yet published) [P3144R2](https://wiki.edg.com/pub/Wg21stlouis2024/StrawPolls/p3144r2.pdf) "Deleting a Pointer to an Incomplete Type Should be Ill-formed". Wording changes (not yet mer

[clang] [Clang] Warn on backslash-newline-EOF (PR #97585)

2024-07-04 Thread Vlad Serebrennikov via cfe-commits
@@ -536,3 +536,12 @@ namespace cwg1696 { // cwg1696: 7 }; #endif } + +// cwg1698: yes Endilll wrote: ```suggestion // cwg1698: 2.7 ``` https://github.com/llvm/llvm-project/pull/97585 ___ cfe-commits mailing list c

[clang] [Clang] Warn on backslash-newline-EOF (PR #97585)

2024-07-04 Thread Vlad Serebrennikov via cfe-commits
@@ -0,0 +1,11 @@ +// RUN: %clang_cc1 -std=c++11 -pedantic-errors -verify=expected %s -E | FileCheck %s --strict-whitespace --allow-empty Endilll wrote: We run DR tests in complete range of C++ versions. https://github.com/llvm/llvm-project/pull/97585 __

[clang] [Clang] Warn on backslash-newline-EOF (PR #97585)

2024-07-04 Thread Vlad Serebrennikov via cfe-commits
@@ -0,0 +1,11 @@ +// RUN: %clang_cc1 -std=c++11 -pedantic-errors -verify=expected %s -E | FileCheck %s --strict-whitespace --allow-empty Endilll wrote: You forgot C++14. https://github.com/llvm/llvm-project/pull/97585 ___

[clang] [Clang] Warn on backslash-newline-EOF (PR #97585)

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

[clang] [Clang] Warn on backslash-newline-EOF (PR #97585)

2024-07-05 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll commented: DR tests look good now. https://github.com/llvm/llvm-project/pull/97585 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Implement P3144R2 "Deleting a Pointer to an Incomplete Type..." (PR #97733)

2024-07-05 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/97733 >From f009148063ba41d39fc844f4432ceb51377f381c Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Thu, 4 Jul 2024 17:05:11 +0300 Subject: [PATCH 1/2] [clang] Implement P3144R2 "Deleting a Pointer to an Inco

[clang] [clang] Implement P3144R2 "Deleting a Pointer to an Incomplete Type..." (PR #97733)

2024-07-05 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: > LGTM, generally speaking, but do we maybe want change the old diagnostic to > mention that it’s ‘incompatible w/ C++26’ or however we usually phrase that? Done. > Oh also, this still needs a release note and an entry in the C++ support > docs, doesn’t it? Done. I also adde

[clang] [clang] Add C++26 diagnostics to compatibility diagnosic groups (PR #97806)

2024-07-05 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll created https://github.com/llvm/llvm-project/pull/97806 This patch adds `CXXPre26Compat` and `CXXPre26CompatPedantic` groups (which are concerned with new features not available in older language modes) to `CXX98Compat`, etc. This way, if user has `-Wc++20-compat` an

[clang] [clang] Add C++26 diagnostics to compatibility diagnosic groups (PR #97806)

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

[clang] [clang] Add C++26 diagnostics to compatibility diagnosic groups (PR #97806)

2024-07-05 Thread Vlad Serebrennikov via cfe-commits
@@ -384,39 +386,47 @@ def CXX11Compat : DiagGroup<"c++11-compat", CXXPre14Compat, CXXPre17Compat, CXXPre20Compat, - CXXPre23Compat]>; +

[clang] [clang] Implement P3144R2 "Deleting a Pointer to an Incomplete Type..." (PR #97733)

2024-07-05 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/97733 >From f009148063ba41d39fc844f4432ceb51377f381c Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Thu, 4 Jul 2024 17:05:11 +0300 Subject: [PATCH 1/3] [clang] Implement P3144R2 "Deleting a Pointer to an Inco

[clang] [clang] Implement P3144R2 "Deleting a Pointer to an Incomplete Type..." (PR #97733)

2024-07-05 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/97733 >From f009148063ba41d39fc844f4432ceb51377f381c Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Thu, 4 Jul 2024 17:05:11 +0300 Subject: [PATCH 1/4] [clang] Implement P3144R2 "Deleting a Pointer to an Inco

[clang] [clang] Implement P3144R2 "Deleting a Pointer to an Incomplete Type..." (PR #97733)

2024-07-05 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/97733 >From f009148063ba41d39fc844f4432ceb51377f381c Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Thu, 4 Jul 2024 17:05:11 +0300 Subject: [PATCH 1/5] [clang] Implement P3144R2 "Deleting a Pointer to an Inco

[clang] [clang] Implement P3144R2 "Deleting a Pointer to an Incomplete Type..." (PR #97733)

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

[clang] [Clang] Fix parsing of reversible type traits in template arguments (PR #95969)

2024-07-05 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: Stumbled upon a related bug #29631 https://github.com/llvm/llvm-project/pull/95969 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Add C++26 diagnostics to compatibility diagnosic groups (PR #97806)

2024-07-05 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/97806 >From b855fe1b301a156ea45caa4b6fd6eca1c69d5cf5 Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Fri, 5 Jul 2024 12:39:13 +0300 Subject: [PATCH] [clang] Add C++26 diagnostics to compatibility diagnosic gro

[clang] [clang] Add C++26 diagnostics to compatibility diagnosic groups (PR #97806)

2024-07-05 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/97806 >From b855fe1b301a156ea45caa4b6fd6eca1c69d5cf5 Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Fri, 5 Jul 2024 12:39:13 +0300 Subject: [PATCH 1/2] [clang] Add C++26 diagnostics to compatibility diagnosic

[clang] [clang] Add C++26 diagnostics to compatibility diagnosic groups (PR #97806)

2024-07-05 Thread Vlad Serebrennikov via cfe-commits
@@ -384,39 +386,47 @@ def CXX11Compat : DiagGroup<"c++11-compat", CXXPre14Compat, CXXPre17Compat, CXXPre20Compat, - CXXPre23Compat]>; +

[clang] [Clang] Fix Microsoft ABI inheritance model when member pointer is used in a base specifier (PR #91990)

2024-07-06 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll commented: `Sema.h` changes look good. https://github.com/llvm/llvm-project/pull/91990 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Add C++26 diagnostics to compatibility diagnosic groups (PR #97806)

2024-07-06 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/97806 >From b855fe1b301a156ea45caa4b6fd6eca1c69d5cf5 Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Fri, 5 Jul 2024 12:39:13 +0300 Subject: [PATCH 1/3] [clang] Add C++26 diagnostics to compatibility diagnosic

[clang] [clang] Add C++26 diagnostics to compatibility diagnosic groups (PR #97806)

2024-07-06 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/97806 >From b855fe1b301a156ea45caa4b6fd6eca1c69d5cf5 Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Fri, 5 Jul 2024 12:39:13 +0300 Subject: [PATCH 1/4] [clang] Add C++26 diagnostics to compatibility diagnosic

[clang] [clang] Add C++26 diagnostics to compatibility diagnosic groups (PR #97806)

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

[clang] [clang] Add test for CWG2486 (`noexcept` and function pointer conversion) (PR #107131)

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

[clang] [clang] Add tests for CWG issues about language linkage (PR #107019)

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

[clang] nonblocking/nonallocating attributes: 2nd pass caller/callee analysis (PR #99656)

2024-09-04 Thread Vlad Serebrennikov via cfe-commits
@@ -15099,6 +15037,106 @@ class Sema final : public SemaBase { std::string getFixItZeroLiteralForType(QualType T, SourceLocation Loc) const; ///@} + + // Endilll wrote: Yes, this is consistent with the rest of Sema.h https://github.com/llvm/llvm-project

[clang] Reapply "[Clang][CWG1815] Support lifetime extension of temporary created by aggregate initialization using a default member initializer" (PR #97308)

2024-09-08 Thread Vlad Serebrennikov via cfe-commits
@@ -206,19 +206,28 @@ namespace cwg1814 { // cwg1814: yes #endif } -namespace cwg1815 { // cwg1815: no +namespace cwg1815 { // cwg1815: 19 Endilll wrote: Seems to be the case, yeah. >From what I see, this effort was started back before 19 has branched, and wa

[clang] [RFC] Add clang atomic control options and pragmas (PR #102569)

2024-08-09 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: Thank you for the patch, but RFCs for Clang should be published in https://discourse.llvm.org/c/clang/6. PRs doesn't have the visibility we want RFCs to have. https://github.com/llvm/llvm-project/pull/102569 ___ cfe-commits mailing lis

[clang] [clang] Implement CWG2627 Bit-fields and narrowing conversions (PR #78112)

2024-08-09 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll commented: DR test part looks good. https://github.com/llvm/llvm-project/pull/78112 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libclang/python] Fix bug in `SourceRange.__contains__`, add tests (PR #101802)

2024-08-09 Thread Vlad Serebrennikov via cfe-commits
@@ -386,6 +386,10 @@ def __contains__(self, other): # same file, in between lines if self.start.line < other.line < self.end.line: return True +# between columns in one-liner range +elif self.start.line == other.line == self.end.line:

[clang] [libclang/python] Fix bug in `SourceRange.__contains__`, add tests (PR #101802)

2024-08-10 Thread Vlad Serebrennikov via cfe-commits
@@ -386,6 +386,10 @@ def __contains__(self, other): # same file, in between lines if self.start.line < other.line < self.end.line: return True +# between columns in one-liner range +elif self.start.line == other.line == self.end.line:

[clang] [libclang/python] Fix bug in `SourceRange.__contains__`, add tests (PR #101802)

2024-08-10 Thread Vlad Serebrennikov via cfe-commits
@@ -386,6 +386,10 @@ def __contains__(self, other): # same file, in between lines if self.start.line < other.line < self.end.line: return True +# between columns in one-liner range +elif self.start.line == other.line == self.end.line:

[clang] [libclang/python] Fix bug in `SourceRange.__contains__`, add tests (PR #101802)

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

[clang] [libclang/python] Fix bug in `SourceRange.__contains__`, add tests (PR #101802)

2024-08-10 Thread Vlad Serebrennikov via cfe-commits
@@ -386,6 +386,10 @@ def __contains__(self, other): # same file, in between lines if self.start.line < other.line < self.end.line: return True +# between columns in one-liner range +elif self.start.line == other.line == self.end.line:

[clang] [clang] Implement `__builtin_is_implicit_lifetime()` (PR #101807)

2024-08-11 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/101807 >From 9c4e7ccf47d5ede2b6169effb2a09668f512a182 Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Sat, 3 Aug 2024 13:05:21 +0300 Subject: [PATCH 1/3] [clang] Implement `__builtin_is_implicit_lifetime()` Th

[clang] [clang] Implement `__builtin_is_implicit_lifetime()` (PR #101807)

2024-08-11 Thread Vlad Serebrennikov via cfe-commits
@@ -5637,6 +5638,27 @@ static bool EvaluateUnaryTypeTrait(Sema &Self, TypeTrait UTT, return false; case UTT_IsTriviallyEqualityComparable: return isTriviallyEqualityComparableType(Self, T, KeyLoc); + case UTT_IsImplicitLifetime: { +DiagnoseVLAInCXXTypeTrait(Self

[clang] [clang] Implement `__builtin_is_implicit_lifetime()` (PR #101807)

2024-08-11 Thread Vlad Serebrennikov via cfe-commits
@@ -5637,6 +5638,27 @@ static bool EvaluateUnaryTypeTrait(Sema &Self, TypeTrait UTT, return false; case UTT_IsTriviallyEqualityComparable: return isTriviallyEqualityComparableType(Self, T, KeyLoc); + case UTT_IsImplicitLifetime: { +DiagnoseVLAInCXXTypeTrait(Self

[clang] [clang] Implement `__builtin_is_implicit_lifetime()` (PR #101807)

2024-08-11 Thread Vlad Serebrennikov via cfe-commits
@@ -5637,6 +5638,27 @@ static bool EvaluateUnaryTypeTrait(Sema &Self, TypeTrait UTT, return false; case UTT_IsTriviallyEqualityComparable: return isTriviallyEqualityComparableType(Self, T, KeyLoc); + case UTT_IsImplicitLifetime: { +DiagnoseVLAInCXXTypeTrait(Self

[clang] [clang] Implement `__builtin_is_implicit_lifetime()` (PR #101807)

2024-08-11 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/101807 >From 9c4e7ccf47d5ede2b6169effb2a09668f512a182 Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Sat, 3 Aug 2024 13:05:21 +0300 Subject: [PATCH 1/4] [clang] Implement `__builtin_is_implicit_lifetime()` Th

[clang] [clang] Implement `__builtin_is_implicit_lifetime()` (PR #101807)

2024-08-11 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: > can you add tests for non aggregate with non elligible constructors and > destructors ? I don't think that a class with a destructor not eligible via requires clause is well-formed per http://eel.is/c++draft/class.dtor#4: > At the end of the definition of a class, overload res

[clang] [clang] Implement `__builtin_is_implicit_lifetime()` (PR #101807)

2024-08-12 Thread Vlad Serebrennikov via cfe-commits
@@ -5637,6 +5638,27 @@ static bool EvaluateUnaryTypeTrait(Sema &Self, TypeTrait UTT, return false; case UTT_IsTriviallyEqualityComparable: return isTriviallyEqualityComparableType(Self, T, KeyLoc); + case UTT_IsImplicitLifetime: { +DiagnoseVLAInCXXTypeTrait(Self

[clang] [clang] Implement `__builtin_is_implicit_lifetime()` (PR #101807)

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

[clang] [clang] Implement `__builtin_is_implicit_lifetime()` (PR #101807)

2024-08-13 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/101807 >From 9c4e7ccf47d5ede2b6169effb2a09668f512a182 Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Sat, 3 Aug 2024 13:05:21 +0300 Subject: [PATCH 1/5] [clang] Implement `__builtin_is_implicit_lifetime()` Th

[clang] [clang] Implement `__builtin_is_implicit_lifetime()` (PR #101807)

2024-08-13 Thread Vlad Serebrennikov via cfe-commits
@@ -5637,6 +5638,27 @@ static bool EvaluateUnaryTypeTrait(Sema &Self, TypeTrait UTT, return false; case UTT_IsTriviallyEqualityComparable: return isTriviallyEqualityComparableType(Self, T, KeyLoc); + case UTT_IsImplicitLifetime: { +DiagnoseVLAInCXXTypeTrait(Self

<    4   5   6   7   8   9   10   11   12   13   >