[clang] [clang] Introduce `SemaHLSL` (PR #87912)

2024-04-07 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/87912 >From 4a60eb0da7d74ca002040aede6ffc9220314ca33 Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Sun, 7 Apr 2024 12:35:07 +0300 Subject: [PATCH] [clang] Introduce `SemaHLSL` ---

[clang] [clang][NFC] Remove "Sema" prefix from Sema-related functions (PR #87914)

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

[clang] [clang] Introduce `SemaHLSL` (PR #87912)

2024-04-07 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: clang-format 18.1.1 that we use in the workflow is complaining, because it's missing #82097. https://github.com/llvm/llvm-project/pull/87912 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [clang] Introduce `SemaHLSL` (PR #87912)

2024-04-07 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll created https://github.com/llvm/llvm-project/pull/87912 This patch introduces `SemaHLSL` class, and moves some HLSL-related functions there. No functional changes intended. This is a part of the effort to split `Sema` into smaller manageable parts, and follows the

[clang] [clang] Add tests for some CWG 5xx issues (PR #87909)

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

[clang] [clang] Add tests for some CWG 5xx issues (PR #87909)

2024-04-07 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll created https://github.com/llvm/llvm-project/pull/87909 This patch covers [CWG393](https://cplusplus.github.io/CWG/issues/393.html) "Pointer to array of unknown bound in template argument list in parameter" [CWG528](https://cplusplus.github.io/CWG/issues/528.html)

[clang] [Clang] Extend lifetime of temporaries in mem-default-init for P2718R0 (PR #86960)

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

[clang] [clang][NFC] Introduce `SemaBase` (PR #87634)

2024-04-06 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll closed https://github.com/llvm/llvm-project/pull/87634 ___ 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 6xx issues (PR #87876)

2024-04-06 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll created https://github.com/llvm/llvm-project/pull/87876 This patch covers [CWG605](https://cplusplus.github.io/CWG/issues/605.html) "Linkage of explicit specializations", [CWG650](https://cplusplus.github.io/CWG/issues/650.html) "Order of destruction for temporaries

[clang] [clang] Reject incomplete types in `__is_layout_compatible()` (PR #87869)

2024-04-06 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll created https://github.com/llvm/llvm-project/pull/87869 This is a follow-up to #81506. As discussed in #87737, we're rejecting incomplete types, save for exceptions listed in the C++ standard (`void` and arrays of unknown bound). Note that arrays of unknown bound of

[clang] [clang][NFC] Introduce `SemaBase` (PR #87634)

2024-04-05 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/87634 >From 311e2ef14dda46686b473e813028a2c3b2ac1254 Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Thu, 4 Apr 2024 16:07:35 +0300 Subject: [PATCH] [clang][NFC] Introduce `SemaBase` This is a follow-up to

[clang] [clang] Claim conformance for CWG466 (PR #87748)

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

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

2024-04-05 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll closed https://github.com/llvm/llvm-project/pull/87744 ___ 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-05 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll closed https://github.com/llvm/llvm-project/pull/87737 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [OpenACC] Implement Sema work for OpenACC Clauses (PR #87821)

2024-04-05 Thread Vlad Serebrennikov via cfe-commits
@@ -12252,6 +12252,8 @@ def warn_acc_clause_unimplemented def err_acc_construct_appertainment : Error<"OpenACC construct '%0' cannot be used here; it can only " "be used in a statement context">; +def err_acc_clause_appertainment +: Error<"OpenACC '%1'

[clang] [OpenACC] Implement Sema work for OpenACC Clauses (PR #87821)

2024-04-05 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll commented: I hope #87634 will be merged soon, so you can get rid of `SemaRef.Diag()` here. https://github.com/llvm/llvm-project/pull/87821 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [OpenACC] Implement Sema work for OpenACC Clauses (PR #87821)

2024-04-05 Thread Vlad Serebrennikov via cfe-commits
@@ -3594,11 +3595,26 @@ class Parser : public CodeCompletionHandler { OpenACCDirectiveKind DirKind; SourceLocation StartLoc; SourceLocation EndLoc; -// TODO OpenACC: Add Clause list here once we have a type for that. +SmallVector Clauses; // TODO

[clang] [OpenACC] Implement Sema work for OpenACC Clauses (PR #87821)

2024-04-05 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll edited https://github.com/llvm/llvm-project/pull/87821 ___ 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-05 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/87737 >From ef24f642ca78d357018d6023fb3d9011f115299b Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Fri, 5 Apr 2024 06:22:35 +0300 Subject: [PATCH 1/2] [clang] Reject VLAs in `__is_layout_compatible()` This

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

2024-04-05 Thread Vlad Serebrennikov via cfe-commits
@@ -1741,8 +1741,10 @@ void is_layout_compatible(int n) static_assert(!__is_layout_compatible(unsigned char, signed char)); static_assert(__is_layout_compatible(int[], int[])); static_assert(__is_layout_compatible(int[2], int[2])); -

[clang] [clang] CTAD: build aggregate deduction guides for alias templates. (PR #85904)

2024-04-05 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/85904 ___ 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-05 Thread Vlad Serebrennikov via cfe-commits
@@ -1741,8 +1741,10 @@ void is_layout_compatible(int n) static_assert(!__is_layout_compatible(unsigned char, signed char)); static_assert(__is_layout_compatible(int[], int[])); static_assert(__is_layout_compatible(int[2], int[2])); -

[clang] [clang] Catch missing format attributes (PR #70024)

2024-04-05 Thread Vlad Serebrennikov via cfe-commits
@@ -1698,6 +1698,9 @@ class Sema final { ChangedStateAtExit }; + void DiagnoseMissingFormatAttributes(const FunctionDecl *FDecl, Endilll wrote: This declaration is placed among functions implemented in `SemaAttr.cpp`, as you might see around line

[clang] [clang] Catch missing format attributes (PR #70024)

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

[clang] [clang] Catch missing format attributes (PR #70024)

2024-04-05 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll edited https://github.com/llvm/llvm-project/pull/70024 ___ 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-05 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: > However, at the language level, I cannot find any wording either way. In my reading, http://eel.is/c++draft/basic.types.general#11 makes any type layout-compatible with itself, and even ignores cv-qualification: > Two types cv1 T1 and cv2 T2 are [layout-compatible >

[clang] [clang] Add test for CWG593 (PR #87752)

2024-04-05 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll created https://github.com/llvm/llvm-project/pull/87752 [CWG593](https://cplusplus.github.io/CWG/issues/593.html) "Falling off the end of a destructor's function-try-block handler". As usual with CWG issues resolved as NAD, we test for status-quo confirmed by CWG.

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

2024-04-05 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: > I think the current behavior is reasonable-ish. Rejecting specific types is a > bit weird... I think VLA should model incomplete types (but we currently > don't reject that either, which is a bug) > > IE, I would expect __is_layout_compatible to return false in the presence

[clang] [clang] Claim conformance for CWG466 (PR #87748)

2024-04-05 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll created https://github.com/llvm/llvm-project/pull/87748 [CWG466](https://cplusplus.github.io/CWG/issues/466.html) "cv-qualifiers on pseudo-destructor type". Richard claimed that we don't implement this DR because of one ill-formed example being accepted:

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

2024-04-04 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/87744 >From 4a666d69a49386a6cd282ed112963b3d049fd3c2 Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Fri, 5 Apr 2024 07:57:11 +0300 Subject: [PATCH 1/2] [clang] Add test for CWG392

[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

[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 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] 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-01 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll approved this pull request. LGTM! Disclosure: me and author extensively reviewed this offline before publishing. https://github.com/llvm/llvm-project/pull/87274 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

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

2024-04-01 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll closed 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-04-01 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/7] [clang] Factor out OpenACC part of `Sema` This patch

[clang] [RFC][Clang] Enable custom type checking for printf (PR #86801)

2024-03-27 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/86801 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] add some missing Kinds to libclang python bindings (PR #85571)

2024-03-27 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: > Will these changes find their way into a 18.x release? Not without someone stepping up and getting them through backporting process. https://github.com/llvm/llvm-project/pull/85571 ___ cfe-commits mailing list

[clang] [Clang] Add wraps attribute (for granular integer overflow handling) (PR #86618)

2024-03-27 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/86618 ___ 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
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] 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-24 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/7] [clang] Factor out OpenACC part of `Sema` This patch

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

2024-03-24 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: I added convenience functions to access `ASTContext` and other widely used facilities of `Sema` to `SemaOpenACC`. I intentionally didn't go full base class approach, saving this option for the future. https://github.com/llvm/llvm-project/pull/84184

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

2024-03-24 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/6] [clang] Factor out OpenACC part of `Sema` This patch

[clang] [Clang][Sema] Diagnose class member access expressions naming non-existent members of the current instantiation prior to instantiation in the absence of dependent base classes (PR #84050)

2024-03-23 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/84050 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Catch missing format attributes (PR #70024)

2024-03-23 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: I'm not able to review Sema.h changes because of a merge conflict. https://github.com/llvm/llvm-project/pull/70024 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] add some missing Kinds to libclang python bindings (PR #85571)

2024-03-23 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll commented: This looks good. Sorry for the late reply. https://github.com/llvm/llvm-project/pull/85571 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Set correct FPOptions if attribute 'optnone' presents (PR #85605)

2024-03-23 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/85605 ___ 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-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] 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] 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] [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] [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-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] [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] [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][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] [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-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] 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] 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] 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: 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/3] [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,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] 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] 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 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] [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][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] 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] 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] 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] 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] [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] 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] [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] [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] 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][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] 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] 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
@@ -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
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-tools-extra] [libcxx] [clang] Enable sized deallocation by default in C++14 onwards (PR #83774)

2024-03-05 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll approved this pull request. I used a different approach for CWG292 test that avoids passing `-fsized-deallocation` in 98 and 11 modes, as this is not a conforming mode for them. Now changes to DR tests look good :) I hope you don't mind me pushing commits to your

[clang] [clang-tools-extra] [libcxx] [clang] Enable sized deallocation by default in C++14 onwards (PR #83774)

2024-03-05 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/83774 >From 26245679b0f40b510e628aaed091739e9931c29c Mon Sep 17 00:00:00 2001 From: wangpc Date: Fri, 14 Jul 2023 10:38:14 +0800 Subject: [PATCH 1/3] [clang] Enable sized deallocation by default in C++14 onwards

[clang] [clang][NFC] Format clang/lib/Sema/Sema.cpp (PR #83974)

2024-03-05 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: Bulk formatting of Clang is still under discussion in https://discourse.llvm.org/t/rfc-clang-format-all-the-things/76614. At least I don't see a consensus called there one way or another. Our [developer policy](https://llvm.org/docs/DeveloperPolicy.html) states the following:

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

2024-03-04 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

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