[clang] eaff01f - [clang][NFC] Annotate `CGExprCXX.cpp` with `preferred_type`

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

[clang] bcc4c82 - [clang][NFC] Annotate `CGObjC.cpp` with `preferred_type`

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

[clang] 6884657 - [clang][NFC] Annotate `SemaChecking.cpp` with `preferred_type`

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

[clang] f0b2bcf - [clang][NFC] Annotate `SemaStmt.cpp` with `preferred_type`

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

[clang] 83269a0 - [clang][NFC] Annotate `cc1as_main.cpp` with `preferred_type`

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

[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: https://github.com/llvm/llvm-project/commit/bc1d61cbf8759f5144217af50d2309b55538.

[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: https://github.com/llvm/llvm-project/commit/23bdca2c6737f25f1d184f03021f61157bac6196.

[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: https://github.com/llvm/llvm-project/commit/4bbae068d704752acbd7c5d8652c11b0954742be.

[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: https://github.com/llvm/llvm-project/commit/803374994602910aae2cb483d03bcbdb294b21bb.

[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: https://github.com/llvm/llvm-project/commit/1503db86d65ee2bcc8ec1c2a5a4d00dea02aae0d.

[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: https://github.com/llvm/llvm-project/commit/082439c33fa76ad4df267600472695d24ad53821.

[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: https://github.com/llvm/llvm-project/commit/e3f684d86b308bc2576d813aad1a230aa6b295ab.

[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 &S, NamedDecl *Found, Decl *Templated, (ParamD = Param.dyn_cast()) || (ParamD = Param.dyn_cast()) || (ParamD = Param.dyn_cast()); - switch (DeductionFailure.Result) { - case Sema::TDK_Success: -llvm_un

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

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

[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 Pointer-interconvertibil

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

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

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

[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] 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] 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] 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 `Ide

[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 https://lists.llvm.org/c

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

[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] 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 = ' clas

[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 = ' clas

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

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

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

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

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

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

[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][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-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` doesn't

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

[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, diag::warn_acc_construct_unim

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

[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 https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commit

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

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

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

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

[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 &C, EnumDecl *ED1, EnumDecl *ED2) { /// Check if two fields are layout-compatible. static bool isLayoutCompatible(ASTContext &C, 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/3] [clang] Respect field alignment when evaluating layout c

[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 &C, 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 c

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

[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 &C, 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] 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 refer

[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 &OpenACC() { +assert(OpenACCPtr); Endilll wrote: Given that moving a hot path getter to out-of-line

[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][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] 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 &OpenACC() { Endilll wrote: I'm not too keen to adhere to our style guide here, as this adds noise for

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

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

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

[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 https://lists.

[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. https://

[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] 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][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
@@ -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 should

[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
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
@@ -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 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 https://lists.llvm.org/cgi-bin/mailman/listinfo/cf

[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 cfe-commi

[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: @@ -14478,7 +14478,7 @@ C++ defect report implementation status https://cplusplus.github.io/CWG/issues/2445.html";>2445 C++20 Partia

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

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

[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 ___ cfe-commit

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

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

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

[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", [CWG439](https://cplu

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

[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

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