[clang] [clang] Add examples from [dcl.init.aggr] to C++ conformance tests (PR #91435)

2024-05-08 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll created https://github.com/llvm/llvm-project/pull/91435 This patch adds examples from [[dcl.init.aggr]](http://eel.is/c++draft/dcl.init.aggr) to C++ conformance tests. Testing is done via constant evaluation and static asserts. As far as I can see, the rest of the

[clang] [clang][NFC] Add examples from [dcl.init.aggr] to C++ conformance tests (PR #91435)

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

[clang] [clang][NFC] Add examples from [dcl.init.aggr] to C++ conformance tests (PR #91435)

2024-05-08 Thread Vlad Serebrennikov via cfe-commits
@@ -0,0 +1,294 @@ +// RUN: %clang_cc1 -std=c++2c -verify %s + Endilll wrote: Any reference would become outdated the moment this file is touched next time, so I added one to the PR description, so it makes it into the commit message.

[clang] [clang] Add tests for CWG issues regarding completeness of types (PR #92113)

2024-05-14 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll created https://github.com/llvm/llvm-project/pull/92113 This patch covers the following Core issues: [CWG930](https://cplusplus.github.io/CWG/issues/930.html) "`alignof` with incomplete array type" [CWG1110](https://cplusplus.github.io/CWG/issues/1110.html)

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

2024-05-14 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: @ZequanWu thank you for your help, but next time you should disable renaming passes as specified in https://github.com/llvm/llvm-project/pull/89807#issuecomment-2102760018. C-Reduce output can be typically reduced further manually, but it's a pain without names.

[clang] [clang] Add tests for CWG issues regarding completeness of types (PR #92113)

2024-05-14 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/92113 >From 1ae4b4e9c6b76269b7e279f798057900b5d39a0c Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Tue, 14 May 2024 15:45:30 +0300 Subject: [PATCH 1/4] [clang] Add tests for CWG issues regarding completeness

[clang] [clang] Add tests for CWG issues regarding completeness of types (PR #92113)

2024-05-14 Thread Vlad Serebrennikov via cfe-commits
@@ -67,6 +63,27 @@ void B::g() requires true; } // namespace cwg2847 +namespace cwg2857 { // cwg2857: 2.7 +struct A {}; +struct B { + int operator+(A); +}; +template +struct D; + +void f(A* a, D* d) { + *d + *a; Endilll wrote: Thank you! I used one of

[clang] [clang] Add tests for CWG issues regarding completeness of types (PR #92113)

2024-05-14 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/92113 >From 1ae4b4e9c6b76269b7e279f798057900b5d39a0c Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Tue, 14 May 2024 15:45:30 +0300 Subject: [PATCH 1/5] [clang] Add tests for CWG issues regarding completeness

[clang] [clang] Add tests for CWG issues regarding completeness of types (PR #92113)

2024-05-14 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/92113 >From 1ae4b4e9c6b76269b7e279f798057900b5d39a0c Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Tue, 14 May 2024 15:45:30 +0300 Subject: [PATCH 1/3] [clang] Add tests for CWG issues regarding completeness

[clang] [clang] Add tests for CWG issues regarding completeness of types (PR #92113)

2024-05-15 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/92113 >From 1ae4b4e9c6b76269b7e279f798057900b5d39a0c Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Tue, 14 May 2024 15:45:30 +0300 Subject: [PATCH 1/6] [clang] Add tests for CWG issues regarding completeness

[clang] [clang] Fix CXXNewExpr end source location for 'new struct S' (PR #92266)

2024-05-15 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: `clang-tidy/checkers/modernize/make-unique.cpp` is failing for whatever reason. Otherwise LGTM. https://github.com/llvm/llvm-project/pull/92266 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [clang] Implement CWG2428 "Deprecating a concept" (PR #92295)

2024-05-15 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll created https://github.com/llvm/llvm-project/pull/92295 This patch allows attributes to be attached to C++20 concepts, implementing [CWG2428](https://cplusplus.github.io/CWG/issues/2428.html). >From a0d5a234431f3db2f0283ffa0909bf8c254aa611 Mon Sep 17 00:00:00 2001

[clang] [clang] Add tests for CWG issues regarding completeness of types (PR #92113)

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

[clang] [clang] Implement CWG2428 "Deprecating a concept" (PR #92295)

2024-05-15 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/92295 >From a0d5a234431f3db2f0283ffa0909bf8c254aa611 Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Wed, 15 May 2024 20:20:43 +0300 Subject: [PATCH 1/2] [clang] Implement CWG2428 "Deprecating a concept" ---

[clang] [clang] Implement CWG2428 "Deprecating a concept" (PR #92295)

2024-05-15 Thread Vlad Serebrennikov via cfe-commits
@@ -10698,7 +10698,7 @@ C++ defect report implementation status https://cplusplus.github.io/CWG/issues/1815.html;>1815 CD4 Lifetime extension in aggregate initialization -Clang 19 +Yes Endilll wrote: I updated the branch from `main`, now

[clang] [clang] Implement CWG2428 "Deprecating a concept" (PR #92295)

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

[clang] [clang] Implement CWG2428 "Deprecating a concept" (PR #92295)

2024-05-15 Thread Vlad Serebrennikov via cfe-commits
@@ -10698,7 +10698,7 @@ C++ defect report implementation status https://cplusplus.github.io/CWG/issues/1815.html;>1815 CD4 Lifetime extension in aggregate initialization -Clang 19 +Yes Endilll wrote: This particular one is an unfortunate

[clang] [clang] Implement CWG2428 "Deprecating a concept" (PR #92295)

2024-05-15 Thread Vlad Serebrennikov via cfe-commits
@@ -45,6 +45,34 @@ void fallthrough(int n) { #endif } +namespace cwg2428 { // cwg2428: 19 +#if __cplusplus >= 202002L +template +concept C [[deprecated]] = true; // #C Endilll wrote: I added test with alternative attribute placing. > It would also be good

[clang] [Clang][Sema] Don't build CXXDependentScopeMemberExprs for potentially implicit class member access expressions (PR #92318)

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

[clang] [clang] Implement CWG2428 "Deprecating a concept" (PR #92295)

2024-05-16 Thread Vlad Serebrennikov via cfe-commits
@@ -45,6 +45,34 @@ void fallthrough(int n) { #endif } +namespace cwg2428 { // cwg2428: 19 +#if __cplusplus >= 202002L +template +concept C [[deprecated]] = true; // #C Endilll wrote: Non-standard spellings of this attribute are out of scope of the Core

[clang] [clang] Implement CWG2428 "Deprecating a concept" (PR #92295)

2024-05-16 Thread Vlad Serebrennikov via cfe-commits
@@ -45,6 +45,38 @@ void fallthrough(int n) { #endif } +namespace cwg2428 { // cwg2428: 19 +#if __cplusplus >= 202002L +template +concept C [[deprecated]] = true; // #cwg2428-C + +template +[[deprecated]] concept C2 = true; +// expected-error@-1 {{expected unqualified-id}} +

[clang] [clang] Implement CWG2428 "Deprecating a concept" (PR #92295)

2024-05-16 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/92295 >From a0d5a234431f3db2f0283ffa0909bf8c254aa611 Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Wed, 15 May 2024 20:20:43 +0300 Subject: [PATCH 1/3] [clang] Implement CWG2428 "Deprecating a concept" ---

[clang] d1f96d4 - [clang][NFC] Claim support for P3106R1 since Clang 17

2024-05-16 Thread Vlad Serebrennikov via cfe-commits
Author: Vlad Serebrennikov Date: 2024-05-16T17:53:14+03:00 New Revision: d1f96d4cfe25770827b5f819b6a9de6fef142c9c URL: https://github.com/llvm/llvm-project/commit/d1f96d4cfe25770827b5f819b6a9de6fef142c9c DIFF:

[clang] [clang] Implement CWG2428 "Deprecating a concept" (PR #92295)

2024-05-16 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/92295 >From a0d5a234431f3db2f0283ffa0909bf8c254aa611 Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Wed, 15 May 2024 20:20:43 +0300 Subject: [PATCH 1/7] [clang] Implement CWG2428 "Deprecating a concept" ---

[clang] [clang] Implement CWG2428 "Deprecating a concept" (PR #92295)

2024-05-16 Thread Vlad Serebrennikov via cfe-commits
@@ -45,6 +45,34 @@ void fallthrough(int n) { #endif } +namespace cwg2428 { // cwg2428: 19 +#if __cplusplus >= 202002L +template +concept C [[deprecated]] = true; // #C Endilll wrote: (MSVC spelling was removed.)

[clang] [clang] Implement CWG2428 "Deprecating a concept" (PR #92295)

2024-05-16 Thread Vlad Serebrennikov via cfe-commits
@@ -8092,6 +8092,18 @@ void Sema::checkCall(NamedDecl *FDecl, const FunctionProtoType *Proto, diagnoseArgDependentDiagnoseIfAttrs(FD, ThisArg, Args, Loc); } +void Sema::CheckConstrainedAuto(TypeSourceInfo *TS) { + if (getLangOpts().CPlusPlus20) {

[clang] [clang] Implement CWG2428 "Deprecating a concept" (PR #92295)

2024-05-16 Thread Vlad Serebrennikov via cfe-commits
@@ -8092,6 +8092,18 @@ void Sema::checkCall(NamedDecl *FDecl, const FunctionProtoType *Proto, diagnoseArgDependentDiagnoseIfAttrs(FD, ThisArg, Args, Loc); } +void Sema::CheckConstrainedAuto(TypeSourceInfo *TS) { + if (getLangOpts().CPlusPlus20) { +if (const AutoType

[clang] [clang] Implement CWG2428 "Deprecating a concept" (PR #92295)

2024-05-16 Thread Vlad Serebrennikov via cfe-commits
@@ -45,6 +45,34 @@ void fallthrough(int n) { #endif } +namespace cwg2428 { // cwg2428: 19 +#if __cplusplus >= 202002L +template +concept C [[deprecated]] = true; // #C Endilll wrote: I added support for GNU and MSVC spellings.

[clang] [clang] Implement provisional wording for CWG2398 regarding packs (PR #90820)

2024-05-16 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: > Despite CWG2398 not being voted in yet, the status in > > https://github.com/llvm/llvm-project/blob/e3f42b02a4129947ca2dd820bfb63ffed83027b7/clang/www/cxx_dr_status.html#L14195-L14200 > > should be updated. The only way to update it is to add a test to `clang/test/CXX/drs`.

[clang] [clang] Implement CWG2428 "Deprecating a concept" (PR #92295)

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

[clang] [clang] Implement CWG2428 "Deprecating a concept" (PR #92295)

2024-05-16 Thread Vlad Serebrennikov via cfe-commits
@@ -316,7 +318,8 @@ Parser::ParseConceptDefinition(const ParsedTemplateInfo , const IdentifierInfo *Id = Result.Identifier; SourceLocation IdLoc = Result.getBeginLoc(); - DiagnoseAndSkipCXX11Attributes(); + ParsedAttributes Attrs(AttrFactory); +

[clang] [clang] Implement CWG2428 "Deprecating a concept" (PR #92295)

2024-05-16 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/92295 >From a0d5a234431f3db2f0283ffa0909bf8c254aa611 Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Wed, 15 May 2024 20:20:43 +0300 Subject: [PATCH 1/6] [clang] Implement CWG2428 "Deprecating a concept" ---

[clang] [clang] Implement CWG2428 "Deprecating a concept" (PR #92295)

2024-05-16 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/92295 >From a0d5a234431f3db2f0283ffa0909bf8c254aa611 Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Wed, 15 May 2024 20:20:43 +0300 Subject: [PATCH 1/4] [clang] Implement CWG2428 "Deprecating a concept" ---

[clang] [clang] Implement CWG2428 "Deprecating a concept" (PR #92295)

2024-05-16 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/92295 >From a0d5a234431f3db2f0283ffa0909bf8c254aa611 Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Wed, 15 May 2024 20:20:43 +0300 Subject: [PATCH 1/5] [clang] Implement CWG2428 "Deprecating a concept" ---

[clang] [clang][NFC] Improve const-correctness in `SourceManager` (PR #92436)

2024-05-16 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll created https://github.com/llvm/llvm-project/pull/92436 This patch adds several const-qualified variants of existing member functions to `SourceManager`. I started with removing const qualification from `setNumCreatedFIDsForFileID`, and removing `const_cast` in the

[clang] [clang] Implement CWG2428 "Deprecating a concept" (PR #92295)

2024-05-16 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/92295 >From a0d5a234431f3db2f0283ffa0909bf8c254aa611 Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Wed, 15 May 2024 20:20:43 +0300 Subject: [PATCH 1/8] [clang] Implement CWG2428 "Deprecating a concept" ---

[clang] [clang] Implement CWG2428 "Deprecating a concept" (PR #92295)

2024-05-16 Thread Vlad Serebrennikov via cfe-commits
@@ -167,9 +167,11 @@ Parser::DeclGroupPtrTy Parser::ParseTemplateDeclarationOrSpecialization( LastParamListWasEmpty); // Parse the actual template declaration. - if (Tok.is(tok::kw_concept)) -return Actions.ConvertDeclToDeclGroup( -

[clang] [clang] Implement CWG2428 "Deprecating a concept" (PR #92295)

2024-05-16 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/92295 >From a0d5a234431f3db2f0283ffa0909bf8c254aa611 Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Wed, 15 May 2024 20:20:43 +0300 Subject: [PATCH 1/9] [clang] Implement CWG2428 "Deprecating a concept" ---

[clang] [clang] Implement CWG2851: floating-point conversions in converted constant expressions (PR #90387)

2024-04-29 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: https://github.com/llvm/llvm-project/pull/90352 has been merged. https://github.com/llvm/llvm-project/pull/90387 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Allow constexpr cast from `void*` in more cases (PR #89484)

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

[clang] [clang] Allow constexpr cast from `void*` in more cases (PR #89484)

2024-04-29 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/89484 >From 5985dbe47e052505278d60628bbb5ca751cc3b6c Mon Sep 17 00:00:00 2001 From: offsetof <131769984+offse...@users.noreply.github.com> Date: Sat, 20 Apr 2024 02:35:09 + Subject: [PATCH 1/2] [clang] Allow

[clang] [clang] Use `cwg_index.html` from GitHub for DR status page (PR #90352)

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

[clang] [clang] Use `cwg_index.html` from GitHub for DR status page (PR #90352)

2024-04-29 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: CI has been failing because of unrelated `Clang :: Driver/amdgpu-toolchain.c` test. I'm merging this as is. https://github.com/llvm/llvm-project/pull/90352 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [clang] Fix crash when destructor definition is preceded with '=' (PR #90220)

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

[clang] [clang] Enable C++17 relaxed template template argument matching by default (PR #89807)

2024-05-10 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: It'd also be nice if someone can share a reproducer that crashes on trunk but not on 18.1.0 without names reduced to 1-2 letters. Definitely would speed up the work towards the fix. https://github.com/llvm/llvm-project/pull/89807 ___

[clang] [clang] Enable C++17 relaxed template template argument matching by default (PR #89807)

2024-05-10 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: To be clear, we're asking for a reproducer with normal names first and foremost. I'm thankful for @bgra8 help running `creduce` over what they had, but we wouldn't had this particular conversation if they also provided full original reproducer that we could run `creduce` on

[clang] [clang] Enable C++17 relaxed template template argument matching by default (PR #89807)

2024-05-10 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: > but not having a convenient reproducer is not a good reason to keep the ToT > Clang in a broken state As someone who worked on a different reduction of Sam's reproducer yesterday, and spent whopping 8 hours of work time to get

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

2024-03-06 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll closed 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] Factor out OpenACC part of `Sema` (PR #84184)

2024-03-06 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll created https://github.com/llvm/llvm-project/pull/84184 This patch moves OpenACC parts of `Sema` into a separate class `SemaOpenACC` that is placed in a separate header `Sema/SemaOpenACC.h`. This patch is intended to be a model of factoring things out of `Sema`, so

[clang] [clang-repl] Names declared in if conditions and for-init statements are local to the inner context (C++ 3.3.2p4) (PR #84150)

2024-03-06 Thread Vlad Serebrennikov via cfe-commits
Stefan =?utf-8?q?Gränitz?= , Stefan =?utf-8?q?Gränitz?= , Stefan =?utf-8?q?Gränitz?= , Stefan =?utf-8?q?Gränitz?= , Stefan =?utf-8?q?Gränitz?= Message-ID: In-Reply-To: Endilll wrote: Can you please update your branch with `main`? I'd like to make sure that your new functions in `Sema`

[clang] [clang] Respect field alignment in layout compatibility of structs (PR #84313)

2024-03-07 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/84313 >From 491fc16c777aff8b22893da1cdeb8d137cf28871 Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Thu, 7 Mar 2024 15:16:35 +0300 Subject: [PATCH 1/3] [clang] Respect field alignment when evaluating layout

[clang] Turn 'counted_by' into a type attribute and parse it into 'CountAttributedType' (PR #78000)

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

[clang] [clang] Factor out OpenACC part of `Sema` (PR #84184)

2024-03-07 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: Physical separation of parts of `Sema` while improving incremental compile times means we have to rely on forward declarations, which lead to additional level of indirection at runtime in the form of `Sema` containing pointers to its components, and components containing a

[clang] [clang] Add CodeGen tests for CWG 5xx issues (PR #84303)

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

[clang] [clang] Factor out OpenACC part of `Sema` (PR #84184)

2024-03-07 Thread Vlad Serebrennikov via cfe-commits
@@ -1162,6 +1162,11 @@ class Sema final { /// CurContext - This is the current declaration context of parsing. DeclContext *CurContext; + SemaOpenACC () { +assert(OpenACCPtr); Endilll wrote: Given that moving a hot path getter to out-of-line

[clang] [clang] Add CodeGen tests for CWG 5xx issues (PR #84303)

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

[clang] [clang] Add CodeGen tests for CWG 5xx issues (PR #84303)

2024-03-07 Thread Vlad Serebrennikov via cfe-commits
@@ -0,0 +1,20 @@ +// 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] Respect field alignment in layout compatibility of structs (PR #84313)

2024-03-07 Thread Vlad Serebrennikov via cfe-commits
@@ -19185,7 +19185,8 @@ static bool isLayoutCompatible(ASTContext , EnumDecl *ED1, EnumDecl *ED2) { /// Check if two fields are layout-compatible. static bool isLayoutCompatible(ASTContext , FieldDecl *Field1, - FieldDecl *Field2) { +

[clang] [clang] Respect field alignment in layout compatibility of structs (PR #84313)

2024-03-07 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/84313 >From 491fc16c777aff8b22893da1cdeb8d137cf28871 Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Thu, 7 Mar 2024 15:16:35 +0300 Subject: [PATCH 1/2] [clang] Respect field alignment when evaluating layout

[clang] [clang] Respect field alignment in layout compatibility of structs (PR #84313)

2024-03-07 Thread Vlad Serebrennikov via cfe-commits
@@ -19185,7 +19185,7 @@ static bool isLayoutCompatible(ASTContext , EnumDecl *ED1, EnumDecl *ED2) { /// Check if two fields are layout-compatible. Endilll wrote: Good catch! CWG2586 I implement here basically establish a different set of rules for layout

[clang] [clang] Respect field alignment in layout compatibility of structs (PR #84313)

2024-03-07 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/84313 >From 491fc16c777aff8b22893da1cdeb8d137cf28871 Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Thu, 7 Mar 2024 15:16:35 +0300 Subject: [PATCH 1/4] [clang] Respect field alignment when evaluating layout

[clang] [clang] Respect field alignment in layout compatibility of structs (PR #84313)

2024-03-07 Thread Vlad Serebrennikov via cfe-commits
@@ -19185,7 +19185,7 @@ static bool isLayoutCompatible(ASTContext , EnumDecl *ED1, EnumDecl *ED2) { /// Check if two fields are layout-compatible. Endilll wrote: After an offline discussion, we agreed to keep the boolean, and to add an additional assert to

[clang] [clang] Add CodeGen tests for CWG 5xx issues (PR #84303)

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

[clang] [clang] Respect field alignment in layout compatibility of structs (PR #84313)

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

[clang] [clang] Factor out OpenACC part of `Sema` (PR #84184)

2024-03-06 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/84184 >From 23f4208fb9978370f59cae16db0747acb3e2c906 Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Wed, 6 Mar 2024 18:01:35 +0300 Subject: [PATCH 1/3] [clang] Factor out OpenACC part of `Sema` This patch

[clang] [clang] Factor out OpenACC part of `Sema` (PR #84184)

2024-03-06 Thread Vlad Serebrennikov via cfe-commits
@@ -63,17 +67,17 @@ void Sema::ActOnOpenACCConstruct(OpenACCDirectiveKind K, // here as these constructs do not take any arguments. break; default: -Diag(StartLoc, diag::warn_acc_construct_unimplemented) << K; +Sema.Diag(StartLoc,

[clang] [Clang][Sema] Fix the lambda call expression inside of a type alias declaration (PR #82310)

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

[clang] [Sema] Avoid unnecessary copy on MultiLevelTemplateArgumentList. NFC (PR #84459)

2024-03-08 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: Changes to `Sema.h` look good to me. https://github.com/llvm/llvm-project/pull/84459 ___ 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-05 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] Add some CodeGen tests for CWG 4xx issues (PR #83715)

2024-03-05 Thread Vlad Serebrennikov via cfe-commits
@@ -0,0 +1,24 @@ +// 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] Add some CodeGen tests for CWG 4xx issues (PR #83715)

2024-03-05 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/83715 >From 59a558a653098c1b96b47cffc62b1f3bf1cb92d8 Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Sun, 3 Mar 2024 12:21:17 +0300 Subject: [PATCH 1/3] [clang] Add some CodeGen tests for CWG 4xx issues This

[clang] [Clang][C++23] Implement P1774R8: Portable assumptions (PR #81014)

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

[clang] Turn 'counted_by' into a type attribute and parse it into 'CountAttributedType' (PR #78000)

2024-03-06 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: Can you resolve merge conflicts, so that I can review changes to `Sema.h`? https://github.com/llvm/llvm-project/pull/78000 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [C++20][Coroutines] Lambda-coroutine with operator new in promise_type (PR #84193)

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

[clang] [clang] Factor out OpenACC part of `Sema` (PR #84184)

2024-03-11 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/84184 >From 23f4208fb9978370f59cae16db0747acb3e2c906 Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Wed, 6 Mar 2024 18:01:35 +0300 Subject: [PATCH 1/5] [clang] Factor out OpenACC part of `Sema` This patch

[clang] [clang] Factor out OpenACC part of `Sema` (PR #84184)

2024-03-11 Thread Vlad Serebrennikov via cfe-commits
@@ -0,0 +1,67 @@ +//===- SemaOpenACC.h - Semantic Analysis for OpenACC constructs ---===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier:

[clang] [llvm] [AMDGPU] Adding the amdgpu-num-work-groups function attribute (PR #79035)

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

[clang] nolock/noalloc attributes (PR #84983)

2024-03-12 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll commented: `Sema.h` changes look good to me. Thank you for putting new functions in all the right places! https://github.com/llvm/llvm-project/pull/84983 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] nolock/noalloc attributes (PR #84983)

2024-03-12 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: > This is an early PR to solicit comments on the overall approach and a number > of outstanding questions. You should advertise this elsewhere (e.g. in RFC thread), or remove the draft status so that reviewers can see this as something they should provide feedback on.

[clang] Diagnose misuse of the cleanup attribute (PR #80040)

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

[clang] [clang-tools-extra] [concepts] Preserve the FoundDecl of ConceptReference properly (PR #85032)

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

[clang] [Clang][C++23] Implement P1774R8: Portable assumptions (PR #81014)

2024-03-07 Thread Vlad Serebrennikov via cfe-commits
@@ -1996,6 +1996,30 @@ Here is an example: }]; } +def AssumeDocs : Documentation { + let Category = DocCatStmt; + let Heading = "assume"; + let Content = [{ +The ``assume`` attribute is used to indicate to the optimizer that a +certain condition can be assumed to be true

[clang] [clang] Respect field alignment in layout compatibility of structs (PR #84313)

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

[clang] [clang] Respect field alignment when evaluating layout compatibility of structs (PR #84313)

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

[clang] [clang] Add CodeGen tests for CWG 5xx issues (PR #84303)

2024-03-07 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll created https://github.com/llvm/llvm-project/pull/84303 This patch covers [CWG519](https://cplusplus.github.io/CWG/issues/519.html) "Null pointer preservation in `void*` conversions", [CWG571](https://cplusplus.github.io/CWG/issues/571.html) "References declared

[clang] [clang] Respect field alignment when evaluating layout compatiblity of structs (PR #84313)

2024-03-07 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll created https://github.com/llvm/llvm-project/pull/84313 This patch implements [CWG2586](https://cplusplus.github.io/CWG/issues/2583.html) "Common initial sequence should consider over-alignment". Note that alignment of union members doesn't have to match, as layout

[clang] [clang] Implement CTAD for type alias template. (PR #77890)

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

[clang] [clang] Factor out OpenACC part of `Sema` (PR #84184)

2024-03-07 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/84184 >From 23f4208fb9978370f59cae16db0747acb3e2c906 Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Wed, 6 Mar 2024 18:01:35 +0300 Subject: [PATCH 1/4] [clang] Factor out OpenACC part of `Sema` This patch

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

2024-03-06 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll closed 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] Factor out OpenACC part of `Sema` (PR #84184)

2024-03-11 Thread Vlad Serebrennikov via cfe-commits
@@ -1162,6 +1162,11 @@ class Sema final { /// CurContext - This is the current declaration context of parsing. DeclContext *CurContext; + SemaOpenACC () { Endilll wrote: I'm not too keen to adhere to our style guide here, as this adds noise for users

[clang] [clang] Factor out OpenACC part of `Sema` (PR #84184)

2024-03-11 Thread Vlad Serebrennikov via cfe-commits
@@ -0,0 +1,67 @@ +//===- SemaOpenACC.h - Semantic Analysis for OpenACC constructs ---===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier:

[clang] [clang] Factor out OpenACC part of `Sema` (PR #84184)

2024-03-25 Thread Vlad Serebrennikov via cfe-commits
@@ -0,0 +1,74 @@ +//===- SemaOpenACC.h - Semantic Analysis for OpenACC constructs ---===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier:

[clang] [clang] Factor out OpenACC part of `Sema` (PR #84184)

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

[clang] [clang] Factor out OpenACC part of `Sema` (PR #84184)

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

[clang] [clang] Factor out OpenACC part of `Sema` (PR #84184)

2024-03-25 Thread Vlad Serebrennikov via cfe-commits
@@ -0,0 +1,74 @@ +//===- SemaOpenACC.h - Semantic Analysis for OpenACC constructs ---===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier:

[clang] [clang] Fix crash when inheriting from a cv-qualified type (PR #70594)

2024-04-02 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: You might want to include a test from https://github.com/llvm/llvm-project/issues/85256#issuecomment-2031815104 https://github.com/llvm/llvm-project/pull/70594 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [clang] Add test for CWG1606 (PR #87274)

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

[clang] [clang] Fix crash when inheriting from a cv-qualified type (PR #70594)

2024-04-02 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: I can land this for you after CI passes. https://github.com/llvm/llvm-project/pull/70594 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Reject VLAs in `__is_layout_compatible()` (PR #87737)

2024-04-04 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll created https://github.com/llvm/llvm-project/pull/87737 This is a follow-up to #81506. Since `__is_layout_compatible()` is a C++ intrinsic

[clang] [clang] Add test for CWG392 (PR #87744)

2024-04-04 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll created https://github.com/llvm/llvm-project/pull/87744 [CWG392](https://cplusplus.github.io/CWG/issues/392.html) "Use of full expression lvalue before temporary destruction". We're testing that `operator bool()` is called before destructor of `C`. I'm also marking

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