[clang] [Clang][Sema] Implement approved resolution for CWG2858 (PR #88042)

2024-04-09 Thread Vlad Serebrennikov via cfe-commits
@@ -58,3 +58,24 @@ void B::g() requires true; #endif } // namespace dr2847 + +namespace dr2858 { // dr2858: 19 + +#if __cplusplus > 202302L + +template +struct A { + // FIXME: The nested-name-specifier in the following friend declarations are declarative, En

[clang] [Clang][Sema] Implement approved resolution for CWG2858 (PR #88042)

2024-04-09 Thread Vlad Serebrennikov via cfe-commits
@@ -58,3 +58,24 @@ void B::g() requires true; #endif } // namespace dr2847 + +namespace dr2858 { // dr2858: 19 + +#if __cplusplus > 202302L + +template +struct A { + // FIXME: The nested-name-specifier in the following friend declarations are declarative, + // but we don't

[clang] [Clang][AST] Track whether template template parameters used the 'typename' keyword (PR #88139)

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

[clang] [Clang][Sema] Implement approved resolution for CWG2858 (PR #88042)

2024-04-09 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll commented: This looks much better now, thank you! As Corentin suggested earlier, run `clang/www/make_cxx_dr_status` to update the DR page, and this should be good to go. https://github.com/llvm/llvm-project/pull/88042 ___ c

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

2024-04-09 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/87909 >From 222f444f91d477bbc1ab2657a7f820740031f765 Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Sun, 7 Apr 2024 10:52:10 +0300 Subject: [PATCH 1/3] [clang] Add tests for some CWG 5xx issues --- clang/tes

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

2024-04-09 Thread Vlad Serebrennikov via cfe-commits
@@ -661,6 +680,10 @@ namespace dr553 { } // dr554: na + +// dr555: na Endilll wrote: I added a proper test for 555. Basically, I copied 466 test, and derived reference tests from it. In 466, I derived a test for non-pointer and non-reference scalar types.

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

2024-04-09 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] Improve source location in binary type traits diagnostics (PR #88097)

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

[clang] [clang] Introduce `SemaSYCL` (PR #88086)

2024-04-09 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/88086 >From 9a5c872a8cb7de103841538d251df2f4638a4f5e Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Tue, 9 Apr 2024 06:38:25 +0300 Subject: [PATCH 1/2] [clang] Introduce `SemaSYCL` --- clang/include/clang/Se

[clang] [clang] Introduce `SemaSYCL` (PR #88086)

2024-04-09 Thread Vlad Serebrennikov via cfe-commits
@@ -0,0 +1,66 @@ +//===- SemaOpenACC.h 000- Semantic Analysis for SYCL 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] Introduce `SemaSYCL` (PR #88086)

2024-04-09 Thread Vlad Serebrennikov via cfe-commits
@@ -0,0 +1,66 @@ +//===- SemaOpenACC.h 000- Semantic Analysis for SYCL 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] Introduce `SemaSYCL` (PR #88086)

2024-04-09 Thread Vlad Serebrennikov via cfe-commits
@@ -0,0 +1,66 @@ +//===- SemaOpenACC.h 000- Semantic Analysis for SYCL constructs ---===// Endilll wrote: That's... embarrassing. https://github.com/llvm/llvm-project/pull/88086 ___ cfe-commits mailing list cf

[clang] [clang] Introduce `SemaSYCL` (PR #88086)

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

[clang] [clang][NFC] Move more functions to `SemaHLSL` (PR #88354)

2024-04-10 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll created https://github.com/llvm/llvm-project/pull/88354 A follow-up to #87912. I'm moving more HLSL-related functions from `Sema` to `SemaHLSL`. I'm also dropping `HLSL` from their names in the process. >From ecff8db824552872ba055fdc0bca42b1a0386c39 Mon Sep 17 00:00:

[clang] [Clang][Sema] Implement approved resolution for CWG2858 (PR #88042)

2024-04-11 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: `make_cxx_dr_status` is not going to do anything here, since the DR indeed didn't make it into public list. Merge as-is. 2858 is going to be picked up when someone runs the script for the first time after a new revision of core issues list is published. https://github.com/llvm/l

[clang] [Clang][Sema] Implement approved resolution for CWG2858 (PR #88042)

2024-04-11 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: Please do. This is going to be reverted by the next person fetching from public index page anyway, because we ask people to run the script every time they have changes for `cxx_dr_status.html`. In any case, WG21 wikis are of restricted access, and we shouldn't make their content

[clang] [clang][NFC] Move more functions to `SemaHLSL` (PR #88354)

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

[clang] [clang] Implement `__is_pointer_interconvertible_base_of()` (PR #88473)

2024-04-11 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll created https://github.com/llvm/llvm-project/pull/88473 This patch implements intrinsic that supports `std::is_pointer_interconvertible_base_of` type trait from [P0466R5](https://wg21.link/p0466r5) "Layout-compatibility and Pointer-interconvertibility Traits". Norm

[clang] [clang] Implement `__is_pointer_interconvertible_base_of()` (PR #88473)

2024-04-11 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: Relevant issue: #48204 https://github.com/llvm/llvm-project/pull/88473 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Implement `__is_pointer_interconvertible_base_of()` (PR #88473)

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

[clang] [clang] Implement `__is_pointer_interconvertible_base_of()` (PR #88473)

2024-04-11 Thread Vlad Serebrennikov via cfe-commits
@@ -19710,6 +19710,27 @@ bool Sema::IsLayoutCompatible(QualType T1, QualType T2) const { return isLayoutCompatible(getASTContext(), T1, T2); } +//===-- Pointer interconvertibility // + +bool Sema::IsPointerInterconvertibleBaseOf(const

[clang] [clang] Implement `__is_pointer_interconvertible_base_of()` (PR #88473)

2024-04-11 Thread Vlad Serebrennikov via cfe-commits
@@ -6082,6 +6082,22 @@ static bool EvaluateBinaryTypeTrait(Sema &Self, TypeTrait BTT, const TypeSourceI Self.Diag(Rhs->getTypeLoc().getBeginLoc(), diag::err_vla_unsupported) << 1 << tok::kw___is_layout_compatible; return Self.IsLayoutCompatible(LhsT, RhsT);

[clang] [clang] Implement `__is_pointer_interconvertible_base_of()` (PR #88473)

2024-04-11 Thread Vlad Serebrennikov via cfe-commits
@@ -1839,6 +1839,90 @@ void is_layout_compatible(int n) static_assert(!__is_layout_compatible(EnumClassForward, int)); } +namespace IPIBO { +struct Base {}; +struct Base2 {}; +struct Base3 : Base {}; +struct Base3Virtual : virtual Base {}; +struct Derived : Base {}; +struct

[clang] [clang] Implement `__is_pointer_interconvertible_base_of()` (PR #88473)

2024-04-11 Thread Vlad Serebrennikov via cfe-commits
@@ -1740,7 +1740,7 @@ void is_layout_compatible(int n) static_assert(!__is_layout_compatible(void, int)); static_assert(__is_layout_compatible(void, const void)); static_assert(__is_layout_compatible(void, volatile void)); - static_assert(__is_layout_compatible(const int

[clang] [clang] Implement `__is_pointer_interconvertible_base_of()` (PR #88473)

2024-04-11 Thread Vlad Serebrennikov via cfe-commits
@@ -1839,6 +1839,90 @@ void is_layout_compatible(int n) static_assert(!__is_layout_compatible(EnumClassForward, int)); } +namespace IPIBO { +struct Base {}; +struct Base2 {}; +struct Base3 : Base {}; +struct Base3Virtual : virtual Base {}; +struct Derived : Base {}; +struct

[clang] [clang] Implement `__is_pointer_interconvertible_base_of()` (PR #88473)

2024-04-11 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/88473 >From 84907542cecbe76b1971a50642d39ec4d1078687 Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Fri, 12 Apr 2024 08:18:06 +0300 Subject: [PATCH 1/2] [clang] Implement `__is_pointer_interconvertible_base_o

[clang] [clang] Implement `__is_pointer_interconvertible_base_of()` (PR #88473)

2024-04-12 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/88473 >From 84907542cecbe76b1971a50642d39ec4d1078687 Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Fri, 12 Apr 2024 08:18:06 +0300 Subject: [PATCH 1/3] [clang] Implement `__is_pointer_interconvertible_base_o

[clang] [clang] Implement `__is_pointer_interconvertible_base_of()` (PR #88473)

2024-04-12 Thread Vlad Serebrennikov via cfe-commits
@@ -6082,6 +6082,22 @@ static bool EvaluateBinaryTypeTrait(Sema &Self, TypeTrait BTT, const TypeSourceI Self.Diag(Rhs->getTypeLoc().getBeginLoc(), diag::err_vla_unsupported) << 1 << tok::kw___is_layout_compatible; return Self.IsLayoutCompatible(LhsT, RhsT);

[clang] d019b9a - [clang][NFC] Refactor `CXXSpecialMember`

2024-04-12 Thread Vlad Serebrennikov via cfe-commits
Author: Vlad Serebrennikov Date: 2024-04-12T12:21:14+03:00 New Revision: d019b9a60c858ee82fdbaf5de16e048e9db2 URL: https://github.com/llvm/llvm-project/commit/d019b9a60c858ee82fdbaf5de16e048e9db2 DIFF: https://github.com/llvm/llvm-project/commit/d019b9a60c858ee82fdbaf5de16e048e9db2.

[clang] c39df49 - [clang][NFC] Refactor `CUDAFunctionTarget`

2024-04-12 Thread Vlad Serebrennikov via cfe-commits
Author: Vlad Serebrennikov Date: 2024-04-12T13:06:59+03:00 New Revision: c39df496d73621238ba87de235d9a61e2b2203b9 URL: https://github.com/llvm/llvm-project/commit/c39df496d73621238ba87de235d9a61e2b2203b9 DIFF: https://github.com/llvm/llvm-project/commit/c39df496d73621238ba87de235d9a61e2b2203b9.

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

2024-04-12 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll closed 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] Implement `__is_pointer_interconvertible_base_of()` (PR #88473)

2024-04-12 Thread Vlad Serebrennikov via cfe-commits
@@ -1740,7 +1740,7 @@ void is_layout_compatible(int n) static_assert(!__is_layout_compatible(void, int)); static_assert(__is_layout_compatible(void, const void)); static_assert(__is_layout_compatible(void, volatile void)); - static_assert(__is_layout_compatible(const int

[clang] [clang] Implement `__is_pointer_interconvertible_base_of()` (PR #88473)

2024-04-12 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/88473 >From 84907542cecbe76b1971a50642d39ec4d1078687 Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Fri, 12 Apr 2024 08:18:06 +0300 Subject: [PATCH 1/4] [clang] Implement `__is_pointer_interconvertible_base_o

[clang] [clang] Implement `__is_pointer_interconvertible_base_of()` (PR #88473)

2024-04-12 Thread Vlad Serebrennikov via cfe-commits
@@ -6082,6 +6082,22 @@ static bool EvaluateBinaryTypeTrait(Sema &Self, TypeTrait BTT, const TypeSourceI Self.Diag(Rhs->getTypeLoc().getBeginLoc(), diag::err_vla_unsupported) << 1 << tok::kw___is_layout_compatible; return Self.IsLayoutCompatible(LhsT, RhsT);

[clang] [clang] Implement `__is_pointer_interconvertible_base_of()` (PR #88473)

2024-04-12 Thread Vlad Serebrennikov via cfe-commits
@@ -19710,6 +19710,27 @@ bool Sema::IsLayoutCompatible(QualType T1, QualType T2) const { return isLayoutCompatible(getASTContext(), T1, T2); } +//===-- Pointer interconvertibility // + +bool Sema::IsPointerInterconvertibleBaseOf(const

[clang] [clang] Implement `__is_pointer_interconvertible_base_of()` (PR #88473)

2024-04-12 Thread Vlad Serebrennikov via cfe-commits
@@ -19710,6 +19710,27 @@ bool Sema::IsLayoutCompatible(QualType T1, QualType T2) const { return isLayoutCompatible(getASTContext(), T1, T2); } +//===-- Pointer interconvertibility // + +bool Sema::IsPointerInterconvertibleBaseOf(const

[clang] [clang] Introduce `SemaCUDA` (PR #88559)

2024-04-12 Thread Vlad Serebrennikov via cfe-commits
@@ -0,0 +1,304 @@ +//===- SemaCUDA.h - Semantic Analysis for CUDA 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: Ap

[clang] [clang] Introduce `SemaCUDA` (PR #88559)

2024-04-12 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: > Have you run the CUDA / HIP tests in the external test suite or anything? No, just `check-clang` target. You think it's necessary to run something else before merging? If so, you should point me out to what to run, and preferably give some instructions, as CUDA development is

[clang] [clang] Implement `__is_pointer_interconvertible_base_of()` (PR #88473)

2024-04-12 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/88473 >From 84907542cecbe76b1971a50642d39ec4d1078687 Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Fri, 12 Apr 2024 08:18:06 +0300 Subject: [PATCH 1/5] [clang] Implement `__is_pointer_interconvertible_base_o

[clang] [clang] Introduce `SemaCUDA` (PR #88559)

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

[clang] [clang] Implement `__is_pointer_interconvertible_base_of()` (PR #88473)

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

[clang] 5b36bf5 - [clang][NFC] Tidy up extension warnings about `_Static_assert`

2024-04-12 Thread Vlad Serebrennikov via cfe-commits
Author: Vlad Serebrennikov Date: 2024-04-13T08:40:26+03:00 New Revision: 5b36bf549c8c900d0f01451e02abd821f38d4538 URL: https://github.com/llvm/llvm-project/commit/5b36bf549c8c900d0f01451e02abd821f38d4538 DIFF: https://github.com/llvm/llvm-project/commit/5b36bf549c8c900d0f01451e02abd821f38d4538.

[clang] [clang] Migrate DR tests to `static_assert` (PR #88611)

2024-04-13 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll created https://github.com/llvm/llvm-project/pull/88611 This patch touches a number of tests that run in C++98 mode that have been using array size as a context that requires a constant expression, replacing it with a `static_assert` backported via a macro. This redu

[clang] [clang] Migrate DR tests to `static_assert` (PR #88611)

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

[clang] [clang] Migrate DR tests to `static_assert` (PR #88611)

2024-04-13 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: This PR removes a FIXME since it doesn't make sense anymore in that particular context. I created issue #88608 out of it to make sure we don't lose track of it. https://github.com/llvm/llvm-project/pull/88611 ___ cfe-commits mailing li

[clang] 0412a86 - [clang] Add missing documentation entry for `__is_pointer_interconvertible_base_of()`

2024-04-13 Thread Vlad Serebrennikov via cfe-commits
Author: Vlad Serebrennikov Date: 2024-04-13T13:10:42+03:00 New Revision: 0412a8651aa6cbdd697e904a758e0f95e6635cee URL: https://github.com/llvm/llvm-project/commit/0412a8651aa6cbdd697e904a758e0f95e6635cee DIFF: https://github.com/llvm/llvm-project/commit/0412a8651aa6cbdd697e904a758e0f95e6635cee.

[clang] [clang] Migrate DR tests to `static_assert` (PR #88611)

2024-04-13 Thread Vlad Serebrennikov via cfe-commits
@@ -5,6 +5,17 @@ // RUN: %clang_cc1 -std=c++11 -verify=expected,cxx98-14,cxx98-17,cxx98-20,cxx11-14,since-cxx11 -triple %itanium_abi_triple %s -fexceptions -fcxx-exceptions -pedantic-errors // RUN: %clang_cc1 -std=c++98 -verify=expected,cxx98-14,cxx98-17,cxx98-20,cxx98 -tripl

[clang] [clang] Migrate DR tests to `static_assert` (PR #88611)

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

[clang] [clang] Migrate DR tests to `static_assert` (PR #88611)

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

[clang] [clang] Migrate DR tests to `static_assert` (PR #88611)

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

[clang] [clang] Migrate DR tests to `static_assert` (PR #88611)

2024-04-13 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/88611 >From c436fe6b0883577f434ee456fdffb224191108e0 Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Sat, 13 Apr 2024 12:46:32 +0300 Subject: [PATCH 1/4] [clang] Migrate DR tests to `static_assert` --- clang/

[clang] [clang] Migrate DR tests to `static_assert` (PR #88611)

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

[clang] cbfcfdf - [clang][NFC] Add a test for CWG2254 to `is_pointer_interconvertible_base_of` tests

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

[clang] [clang] Migrate DR tests to `static_assert` (PR #88611)

2024-04-13 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: > (especially considering you said you’re going to refactor more tests than > just these) @Sirraide I didn't say that originally, but you reminded me that I indeed forgot about all the uses of arrays that don't trigger diagnostics. I went over all of them, and decided to includ

[clang] [clang] Introduce `SemaCUDA` (PR #88559)

2024-04-13 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: @fhahn Yeah, that's theoretically possible. I'll look into it today. https://github.com/llvm/llvm-project/pull/88559 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Fix an issue where clang++ and clangd uses enormous amounts of memory (PR #88637)

2024-04-13 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: I'm not sure this is testable, but if you can think of a test, that would be nice. Can you also add a release note to `clang/ReleaseNotes.rst`? https://github.com/llvm/llvm-project/pull/88637 ___ cfe-commits mailing list cfe-commits@lis

[clang] [clang] Fix high memory consumption during pack deduction (PR #88637)

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

[clang] [clang] Introduce `SemaOpenMP` (PR #88642)

2024-04-13 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: I intentionally split formatting changes into a separate commit if reviewers want to look at changes without formatting noise. If, given the volume of changes here, there is an appetite to remove `OpenMP` and `OMP` from names inside `SemaOpenMP` right in this patch, I can do tha

[clang] [clang] Introduce `SemaCUDA` (PR #88559)

2024-04-13 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: I think I exposed a name conflict with a system header on AIX by including `Cuda.h` in `Sema.h`. Given that this name conflict potentially affects both enum definition and its usage, how should we resolve this? https://github.com/llvm/llvm-project/pull/88559

[clang] [clang] Fix name conflict with `sys/mac.h` on AIX (PR #88644)

2024-04-13 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll created https://github.com/llvm/llvm-project/pull/88644 Fixes clang-ppc64-aix bot failure after #88559 (0a6f6df5b0c3d0f2a42f013bf5cafb9b5020dcac) https://lab.llvm.org/buildbot/#/builders/214/builds/11887 >From 9d46b1ed31d2acbb772f9bb4b139fa1ec36a65ab Mon Sep 17 00:0

[clang] [clang][NFC] Factor out VLA check in type traits (PR #88646)

2024-04-14 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll created https://github.com/llvm/llvm-project/pull/88646 This is a follow-up to #88473 suggested by @cor3ntin in https://github.com/llvm/llvm-project/pull/88473#discussion_r1562198117. >From 34d735b2f85e3c24cbf725f6a519afec6c916820 Mon Sep 17 00:00:00 2001 From: Vlad

[clang] [clang][NFC] Factor out VLA checks in type traits (PR #88646)

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

[clang] [clang][NFC] Factor out VLA checks in type traits (PR #88646)

2024-04-14 Thread Vlad Serebrennikov via cfe-commits
@@ -5012,6 +5012,20 @@ Sema::PerformImplicitConversion(Expr *From, QualType ToType, return From; } +/// Checks that type T is not a VLA. +/// +/// @returns @c true if @p T is VLA and a diagnostic was emitted, +/// @c false otherwise. +static bool DiagnoseVLAInCXXTypeTrait(S

[clang] [clang][NFC] Factor out VLA checks in type traits (PR #88646)

2024-04-14 Thread Vlad Serebrennikov via cfe-commits
@@ -5012,6 +5012,20 @@ Sema::PerformImplicitConversion(Expr *From, QualType ToType, return From; } +/// Checks that type T is not a VLA. +/// +/// @returns @c true if @p T is VLA and a diagnostic was emitted, +/// @c false otherwise. +static bool DiagnoseVLAInCXXTypeTrait(S

[clang] [clang][NFC] Factor out VLA checks in type traits (PR #88646)

2024-04-14 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/88646 >From 34d735b2f85e3c24cbf725f6a519afec6c916820 Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Sun, 14 Apr 2024 10:41:53 +0300 Subject: [PATCH] [clang][NFC] Factor out VLA check in type traits --- clang

[clang] [clang][NFC] Factor out VLA checks in type traits (PR #88646)

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

[clang] [clang] Fix name conflict with `sys/mac.h` on AIX (PR #88644)

2024-04-14 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/88644 >From 9d46b1ed31d2acbb772f9bb4b139fa1ec36a65ab Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Sun, 14 Apr 2024 08:46:27 +0300 Subject: [PATCH] [clang] Fix name conflict with `sys/mac.h` on AIX Fixes cla

[clang] [clang] Introduce `SemaOpenMP` (PR #88642)

2024-04-14 Thread Vlad Serebrennikov via cfe-commits
@@ -11,6 +11,7 @@ /// //===--===// +#include "clang/Sema/SemaOpenMP.h" Endilll wrote: Main module header goes first per our coding standard: https://llvm.org/docs/CodingStandards.html#inclu

[clang] [clang] Introduce `SemaOpenMP` (PR #88642)

2024-04-14 Thread Vlad Serebrennikov via cfe-commits
@@ -997,6 +987,11 @@ class Sema final : public SemaBase { return *OpenACCPtr; } + SemaOpenMP &OpenMP() { Endilll wrote: This was discussed back when we started splitting `Sema` up: https://github.com/llvm/llvm-project/pull/84184#discussion_r1520027821

[clang] [clang] Introduce `SemaOpenMP` (PR #88642)

2024-04-14 Thread Vlad Serebrennikov via cfe-commits
@@ -997,6 +987,11 @@ class Sema final : public SemaBase { return *OpenACCPtr; } + SemaOpenMP &OpenMP() { +assert(OpenMPPtr); Endilll wrote: Done https://github.com/llvm/llvm-project/pull/88642 ___ cfe-co

[clang] [clang] Fix name conflict with `sys/mac.h` on AIX (PR #88644)

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

[clang] [Clang] Allow the value of unroll count to be zero in `#pragma GCC unroll` and `#pragma unroll` (PR #88666)

2024-04-14 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: `Sema.h` changes look good. https://github.com/llvm/llvm-project/pull/88666 ___ 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-04 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: > Apparently, buildbot is mad at me > (https://lab.llvm.org/buildbot/#/builders/165/builds/49741)? > > I’m not entirely sure how a fix that affects only > -fdump-record-layouts-complete could have caused this. Is this a spurious > failure or due to something unrelated, or is it

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

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

[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

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

[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 PR.

[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

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