[clang] [libcxx] [SemaCXX] Implement CWG2137 (list-initialization from objects of the same type) (PR #77768)

2024-01-11 Thread Vlad Serebrennikov via cfe-commits
@@ -132,6 +142,36 @@ namespace dr2126 { // dr2126: 12 #endif } +namespace dr2137 { // dr2137: 18 +#if __cplusplus >= 201103L + struct Q { +Q(); +Q(Q&&); +Q(std::initializer_list) = delete; // expected-note 2 {{has been explicitly marked deleted here}} + }; + +

[clang] [libcxx] [SemaCXX] Implement CWG2137 (list-initialization from objects of the same type) (PR #77768)

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

[clang] [Clang][C++23] Implement P2448R2: Relaxing some constexpr restrictions (PR #77753)

2024-01-11 Thread Vlad Serebrennikov via cfe-commits
@@ -349,8 +349,8 @@ namespace dr1684 { // dr1684: 3.6 }; constexpr int f(NonLiteral &) { return 0; } constexpr int f(NonLiteral) { return 0; } - // since-cxx11-error@-1 {{constexpr function's 1st parameter type 'NonLiteral' is not a literal type}} - //

[clang] [Clang][C++23] Implement P2448R2: Relaxing some constexpr restrictions (PR #77753)

2024-01-11 Thread Vlad Serebrennikov via cfe-commits
@@ -410,11 +410,11 @@ namespace dr1358 { // dr1358: 3.1 struct B : Virt { int member; constexpr B(NonLit u) : member(u) {} -// since-cxx11-error@-1 {{constexpr constructor's 1st parameter type 'NonLit' is not a literal type}} -//

[clang] [Clang][C++23] Implement P2448R2: Relaxing some constexpr restrictions (PR #77753)

2024-01-11 Thread Vlad Serebrennikov via cfe-commits
@@ -423,13 +423,13 @@ namespace dr1359 { // dr1359: 3.5 #if __cplusplus >= 201103L union A { constexpr A() = default; }; union B { constexpr B() = default; int a; }; // #dr1359-B - // cxx11-17-error@-1 {{defaulted definition of default constructor is not constexpr}} +

[clang] [Clang][C++23] Implement P2448R2: Relaxing some constexpr restrictions (PR #77753)

2024-01-11 Thread Vlad Serebrennikov via cfe-commits
@@ -584,8 +584,8 @@ namespace dr647 { // dr647: 3.1 struct C { constexpr C(NonLiteral); constexpr C(NonLiteral, int) {} -// since-cxx11-error@-1 {{constexpr constructor's 1st parameter type 'NonLiteral' is not a literal type}} -//

[clang] [Clang][C++23] Implement P2448R2: Relaxing some constexpr restrictions (PR #77753)

2024-01-11 Thread Vlad Serebrennikov via cfe-commits
@@ -410,11 +410,11 @@ namespace dr1358 { // dr1358: 3.1 struct B : Virt { int member; constexpr B(NonLit u) : member(u) {} -// since-cxx11-error@-1 {{constexpr constructor's 1st parameter type 'NonLit' is not a literal type}} -//

[clang] [Clang][C++23] Implement P2448R2: Relaxing some constexpr restrictions (PR #77753)

2024-01-11 Thread Vlad Serebrennikov via cfe-commits
@@ -153,16 +153,16 @@ namespace dr1460 { // dr1460: 3.5 namespace Defaulted { union A { constexpr A() = default; }; union B { int n; constexpr B() = default; }; -// cxx11-17-error@-1 {{defaulted definition of default constructor is not constexpr}} +//

[clang] [Clang][C++23] Implement P2448R2: Relaxing some constexpr restrictions (PR #77753)

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

[clang] [Clang][C++23] Implement P2448R2: Relaxing some constexpr restrictions (PR #77753)

2024-01-11 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll commented: I checked changes to DR tests, as that's the only part of this PR I'm competent enough for. https://github.com/llvm/llvm-project/pull/77753 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang-tools-extra] [clang] [llvm] [clang] Add test for CWG472 (PR #67948)

2024-01-10 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: > In the proposed resolution, i do not understand why B* bp = n2p; should be > ill-formed by virtue of being declared in P2 @cor3ntin Do you understand why http://eel.is/c++draft/class.protected#1 is there? (I'm trying to pick the best point to start explanation from)

[clang] [llvm] [clang-tools-extra] [clang] Add test for CWG472 (PR #67948)

2024-01-10 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/67948 >From ad0df2131e12c59e57b603b955626e27e3067505 Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Mon, 2 Oct 2023 08:12:56 +0300 Subject: [PATCH 1/2] [clang] Add test for CWG472 ---

[llvm] [clang] [clang-tools-extra] [clang] Add test for CWG472 (PR #67948)

2024-01-10 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/67948 >From ad0df2131e12c59e57b603b955626e27e3067505 Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Mon, 2 Oct 2023 08:12:56 +0300 Subject: [PATCH] [clang] Add test for CWG472 ---

[clang] [clang][NFC] Improve comments in C++ DR test suite (PR #77670)

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

[clang] [clang] Add test for CWG1807 (PR #77637)

2024-01-10 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/77637 >From 545ee4900e48b186e1c9fff93dc62a459ee19754 Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Wed, 10 Jan 2024 20:27:53 +0300 Subject: [PATCH 1/4] [clang] Add test for CWG1807 The test checks that

[clang] [clang] Add test for CWG1807 (PR #77637)

2024-01-10 Thread Vlad Serebrennikov via cfe-commits
@@ -0,0 +1,31 @@ +// 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,CXX98 +// RUN: %clang_cc1 -std=c++11 %s -triple x86_64-linux-gnu -emit-llvm -o -

[clang] [clang] Add test for CWG1807 (PR #77637)

2024-01-10 Thread Vlad Serebrennikov via cfe-commits
@@ -164,6 +164,8 @@ void A::C::f4() { } } // namespace dr1804 +// dr1807 is in separate file Endilll wrote: Addressed in the last update. https://github.com/llvm/llvm-project/pull/77637 ___ cfe-commits mailing

[clang] [clang][NFC] Improve comments in C++ DR test suite (PR #77670)

2024-01-10 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: This PR is created to check it against CI https://github.com/llvm/llvm-project/pull/77670 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][NFC] Improve comments in C++ DR test suite (PR #77670)

2024-01-10 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll created https://github.com/llvm/llvm-project/pull/77670 Previously, we've been mentioning tests that were placed in their own files in corresponding `drNNxx.cpp` file. This patch makes sure we do this consistently, and improves upon existing practice by specifying

[libc] [clang-tools-extra] [flang] [libcxx] [lld] [compiler-rt] [libunwind] [llvm] [libclc] [lldb] [clang] [clang] Add tests for DRs about complete-class context (PR #77444)

2024-01-10 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/77444 >From 1cbf8eec15112cd6871fcfb69425c62f08c8f681 Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Tue, 9 Jan 2024 14:17:21 +0300 Subject: [PATCH 1/3] [clang] Add tests for DRs about complete-class context

[clang] [clang] Add test for CWG1807 (PR #77637)

2024-01-10 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/77637 >From 545ee4900e48b186e1c9fff93dc62a459ee19754 Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Wed, 10 Jan 2024 20:27:53 +0300 Subject: [PATCH 1/3] [clang] Add test for CWG1807 The test checks that

[clang] [clang] Add test for CWG1807 (PR #77637)

2024-01-10 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/77637 >From 545ee4900e48b186e1c9fff93dc62a459ee19754 Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Wed, 10 Jan 2024 20:27:53 +0300 Subject: [PATCH 1/2] [clang] Add test for CWG1807 The test checks that

[clang] [clang] Add test for CWG1807 (PR #77637)

2024-01-10 Thread Vlad Serebrennikov via cfe-commits
@@ -0,0 +1,31 @@ +// 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,CXX98 +// RUN: %clang_cc1 -std=c++11 %s -triple x86_64-linux-gnu -emit-llvm -o -

[clang] [clang] Add test for CWG1807 (PR #77637)

2024-01-10 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: @erichkeane Defect report reads > The test should also validate the non-catch case! The destruction order is > also relevant for the 'try' block's cleanup as well. So there is probably two > different 'check' sections here that need to happen. So I think while both your points

[clang] [clang] Add test for CWG1807 (PR #77637)

2024-01-10 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: Our C++ DR test suite has little codegen tests (around 3 or 4, depending on how you count). This rather simple DR about order of destruction of stack unwinding aims to establish a precedent for how such test should be written. Specific points I'd like to highlight: 1. Use of

[clang] [clang] Add test for CWG1807 (PR #77637)

2024-01-10 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll created https://github.com/llvm/llvm-project/pull/77637 The test checks that objects in arrays are destructed in reverse order during stack unwinding. >From 545ee4900e48b186e1c9fff93dc62a459ee19754 Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Wed, 10 Jan

[libc] [compiler-rt] [libclc] [clang] [llvm] [clang-tools-extra] [lld] [flang] [lldb] [libunwind] [libcxx] [clang] Add tests for DRs about complete-class context (PR #77444)

2024-01-10 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/77444 >From 1cbf8eec15112cd6871fcfb69425c62f08c8f681 Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Tue, 9 Jan 2024 14:17:21 +0300 Subject: [PATCH 1/2] [clang] Add tests for DRs about complete-class context

[clang] [clang] Add tests for DRs about complete-class context (PR #77444)

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

[clang] [clang] Add tests for DRs about complete-class context (PR #77444)

2024-01-10 Thread Vlad Serebrennikov via cfe-commits
@@ -42,6 +42,28 @@ namespace dr1611 { // dr1611: dup 1658 C c; } +namespace dr1626 { // dr1626: no open +// FIXME: current consensus for CWG2335 is that the examples are well-formed. Endilll wrote: Intent expressed in P1787 in PR description seems rather

[clang] [clang] Add tests for CWG1800-1804 (PR #77509)

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

[clang] [clang] Add tests for CWG1800-1804 (PR #77509)

2024-01-09 Thread Vlad Serebrennikov via cfe-commits
@@ -1,16 +1,169 @@ -// RUN: %clang_cc1 -std=c++98 -triple x86_64-unknown-unknown %s -verify=expected,cxx98 -fexceptions -Wno-deprecated-builtins -fcxx-exceptions -pedantic-errors -// RUN: %clang_cc1 -std=c++11 -triple x86_64-unknown-unknown %s

[clang] [clang] Add tests for CWG1800-1804 (PR #77509)

2024-01-09 Thread Vlad Serebrennikov via cfe-commits
@@ -1,16 +1,169 @@ -// RUN: %clang_cc1 -std=c++98 -triple x86_64-unknown-unknown %s -verify=expected,cxx98 -fexceptions -Wno-deprecated-builtins -fcxx-exceptions -pedantic-errors -// RUN: %clang_cc1 -std=c++11 -triple x86_64-unknown-unknown %s

[clang] [clang] Add tests for CWG1800-1804 (PR #77509)

2024-01-09 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/77509 >From d3cb62eba8e2109e44083bd8b9e89a453acad754 Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Tue, 9 Jan 2024 21:51:00 +0300 Subject: [PATCH 1/2] [clang] Add tests for CWG1800-1804 Covers C++ core

[clang] [clang] Add tests for CWG1800-1804 (PR #77509)

2024-01-09 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: This PR also updates status for CWG437, which is a follow-up to #77372. Nothing wrong with the tooling, just my mistake separating output of make_cxx_dr_status from changes I already had for complete-class context DRs. https://github.com/llvm/llvm-project/pull/77509

[clang] [clang] Add tests for CWG1800-1804 (PR #77509)

2024-01-09 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll created https://github.com/llvm/llvm-project/pull/77509 Covers C++ core issues 1800, 1801, 1802, 1803, 1804. >From d3cb62eba8e2109e44083bd8b9e89a453acad754 Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Tue, 9 Jan 2024 21:51:00 +0300 Subject: [PATCH]

[clang] [clang] Add tests for DRs about complete-class context (PR #77444)

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

[clang] [clang] Add tests for DRs about complete-class context (PR #77444)

2024-01-09 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: This PR has been migrated from https://reviews.llvm.org/D148433. I made non-functional changes to `expected` directives to match the rest of the DR test suite. I also moved CWG2335 test in a dedicated file in order to avoid issues with test isolation. Clang can stop

[clang] [clang] Add tests for DRs about complete-class context (PR #77444)

2024-01-09 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll created https://github.com/llvm/llvm-project/pull/77444 [P1787](https://wg21.link/p1787): The intent for CWG2335 (contra those of the older CWG1890, CWG1626, CWG1255, and CWG287) is supported by retaining the unrestricted forward lookup in complete-class contexts

[clang] [clang] Update cxx_dr_status.html (PR #77372)

2024-01-09 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: > Can you modify the commit message to reference the issue list version (113) > and maybe link to it ? I referenced issue list version, but I haven't found a link to this particular version. https://www.open-std.org/jtc1/sc22/wg21/docs/cwg_index.html always points to the most

[clang] [clang] Update cxx_dr_status.html (PR #77372)

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

[clang] [clang] Update cxx_dr_status.html (PR #77372)

2024-01-08 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll created https://github.com/llvm/llvm-project/pull/77372 This patch updates cxx_dr_status.html with the latest changes from CWG, while also changing status of tests written for unresolved issues. The latter part requires review from their author. >From

[clang] [clang] move -Wcast-function-type under -Wextra (PR #77178)

2024-01-07 Thread Vlad Serebrennikov via cfe-commits
@@ -0,0 +1,42 @@ +// RUN: %clang_cc1 %s -fsyntax-only -Wextra -verify + + +int t(int array[static 12]); +int u(int i); +const int v(int i); /* expected-warning {{'const' type qualifier on return type has no effec}} */ +int x(long); + +typedef int (f1)(long); +typedef int

[clang] [clang] move -Wcast-function-type under -Wextra (PR #77178)

2024-01-07 Thread Vlad Serebrennikov via cfe-commits
@@ -0,0 +1,42 @@ +// RUN: %clang_cc1 %s -fsyntax-only -Wextra -verify Endilll wrote: Yes, more `RUN` lines with different `-std=` options, and potentially more `expected` directives tailored for particular language mode. We have an example of this in C++

[clang] [clang] move -Wcast-function-type under -Wextra (PR #77178)

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

[clang] [clang] move -Wcast-function-type under -Wextra (PR #77178)

2024-01-06 Thread Vlad Serebrennikov via cfe-commits
@@ -0,0 +1,42 @@ +// RUN: %clang_cc1 %s -fsyntax-only -Wextra -verify Endilll wrote: As written, tests checks only default language mode for C (which is `gnu99` AFAIK). Maybe we want to check other modes as well?

[clang] [clang] move -Wcast-function-type under -Wextra (PR #77178)

2024-01-06 Thread Vlad Serebrennikov via cfe-commits
@@ -0,0 +1,42 @@ +// RUN: %clang_cc1 %s -fsyntax-only -Wextra -verify + + +int t(int array[static 12]); +int u(int i); +const int v(int i); /* expected-warning {{'const' type qualifier on return type has no effec}} */ +int x(long); + +typedef int (f1)(long); +typedef int

[clang] [clang] move -Wcast-function-type under -Wextra (PR #77178)

2024-01-06 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll commented: I think this PR moves things in the right direction, but I'm not well-versed in C enough to approve. > This should have a release note and I think this is a potentially breaking > change since folks using Wextra may get this diagnostic now. I agree that

[clang] [clang] move -Wcast-function-type under -Wextra (PR #77178)

2024-01-06 Thread Vlad Serebrennikov via cfe-commits
@@ -0,0 +1,42 @@ +// RUN: %clang_cc1 %s -fsyntax-only -Wextra -verify + + +int t(int array[static 12]); +int u(int i); +const int v(int i); /* expected-warning {{'const' type qualifier on return type has no effec}} */ Endilll wrote: ```suggestion const int

[clang] [clang] move -Wcast-function-type under -Wextra (PR #77178)

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

[clang] [Clang] Support MSPropertyRefExpr as placement arg to new-expression (PR #75883)

2024-01-04 Thread Vlad Serebrennikov via cfe-commits
@@ -130,27 +137,24 @@ C &&()(C&) = std::move; // #8 expected-note {{instantiation of}} C &&()(C&) = std::forward; // #9 expected-note {{instantiation of}} int ()(B, B) = std::move; -#if __cplusplus <= 201703L -// expected-warning@#1 {{non-addressable}} -//

[clang] [Clang] Support MSPropertyRefExpr as placement arg to new-expression (PR #75883)

2024-01-04 Thread Vlad Serebrennikov via cfe-commits
@@ -163,6 +170,40 @@ void attribute_const() { std::as_const(n); // expected-warning {{ignoring return value}} } +struct D { + void* operator new(__SIZE_TYPE__, D&&(*)(D&)); + void* operator new(__SIZE_TYPE__, D*(*)(D&)); + void* operator new(__SIZE_TYPE__, const

[clang] [clang][Sema] deleted overriding function can have lax except spec (PR #76248)

2024-01-04 Thread Vlad Serebrennikov via cfe-commits
@@ -379,6 +379,18 @@ namespace dr1347 { // dr1347: 3.1 #endif } +namespace dr1351 { // dr1351: 1 Endilll wrote: I guess you intended `// dr1351: 18`. https://github.com/llvm/llvm-project/pull/76248 ___ cfe-commits

[clang] [clang][Sema] deleted overriding function can have lax except spec (PR #76248)

2024-01-04 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll requested changes to this pull request. You need to run `clang/www/make_cxx_drs` script in order to make `cxx_dr_status.html` reflect that CWG1351 is now implemented. https://github.com/llvm/llvm-project/pull/76248 ___

[clang] [clang][Sema] deleted overriding function can have lax except spec (PR #76248)

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

[clang] [clang] Optimize castToDeclContext for 2% improvement in build times (PR #76825)

2024-01-04 Thread Vlad Serebrennikov via cfe-commits
Pol Marcet =?utf-8?q?Sardà?= , Pol Marcet =?utf-8?q?Sardà?= ,Pol M Message-ID: In-Reply-To: Endilll wrote: @Destroyerrrocket We'll merge as soon as you deem it ready and provide commit description. PR description doesn't seem a good fit for a commit description to me.

[clang] [clang] Optimize castToDeclContext for 2% improvement in build times (PR #76825)

2024-01-04 Thread Vlad Serebrennikov via cfe-commits
Pol Marcet =?utf-8?q?Sard=C3=A0?= Message-ID: In-Reply-To: @@ -70,8 +71,15 @@ class ClangASTNodesEmitter { std::pair EmitNode(raw_ostream& OS, ASTNode Base); public: explicit ClangASTNodesEmitter(RecordKeeper , const std::string , -const

[clang] [clang] Optimize castToDeclContext for 2% improvement in build times (PR #76825)

2024-01-04 Thread Vlad Serebrennikov via cfe-commits
Pol Marcet =?utf-8?q?Sard=C3=A0?= Message-ID: In-Reply-To: https://github.com/Endilll approved this pull request. LGTM, but you should wait for more approvals before merging. https://github.com/llvm/llvm-project/pull/76825 ___ cfe-commits mailing

[clang] [clang] Optimize castToDeclContext for 2% improvement in build times (PR #76825)

2024-01-04 Thread Vlad Serebrennikov via cfe-commits
Pol Marcet =?utf-8?q?Sardà?= Message-ID: In-Reply-To: @@ -95,8 +103,23 @@ std::pair ClangASTNodesEmitter::EmitNode(raw_ostream , if (!Base.isAbstract()) First = Last = Base; + auto comp = [this](ASTNode LHS, ASTNode RHS) { +auto LHSPriorized =

[clang] [clang] Optimize castToDeclContext for 2% improvement in build times (PR #76825)

2024-01-04 Thread Vlad Serebrennikov via cfe-commits
Pol Marcet =?utf-8?q?Sardà?= Message-ID: In-Reply-To: https://github.com/Endilll edited https://github.com/llvm/llvm-project/pull/76825 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [clang] Optimize castToDeclContext for 2% improvement in build times (PR #76825)

2024-01-03 Thread Vlad Serebrennikov via cfe-commits
@@ -95,8 +103,31 @@ std::pair ClangASTNodesEmitter::EmitNode(raw_ostream , if (!Base.isAbstract()) First = Last = Base; + class Comp { Endilll wrote: This class looks like a hand-written lambda closure type. Do we really need it in this form?

[clang] [clang] Optimize castToDeclContext for 2% improvement in build times (PR #76825)

2024-01-03 Thread Vlad Serebrennikov via cfe-commits
@@ -196,8 +227,20 @@ void ClangASTNodesEmitter::run(raw_ostream ) { } void clang::EmitClangASTNodes(RecordKeeper , raw_ostream , - const std::string , const std::string ) { - ClangASTNodesEmitter(RK, N, S).run(OS); +

[clang] [clang] Optimize castToDeclContext for 2% improvement in build times (PR #76825)

2024-01-03 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll commented: Core idea of removing `DECL_CONTEXT_BASE` and range checks for `DeclContext` nodes seems correct to me, as all this machinery wasn't intended for `DeclContext` in the first place. This is apparent from TableGen definition, which lacks any base parameter:

[clang] [clang] Optimize castToDeclContext for 2% improvement in build times (PR #76825)

2024-01-03 Thread Vlad Serebrennikov via cfe-commits
@@ -210,38 +253,26 @@ void clang::EmitClangDeclContext(RecordKeeper , raw_ostream ) { OS << "#ifndef DECL_CONTEXT\n"; OS << "# define DECL_CONTEXT(DECL)\n"; OS << "#endif\n"; - - OS << "#ifndef DECL_CONTEXT_BASE\n"; - OS << "# define DECL_CONTEXT_BASE(DECL)

[clang] [clang] Optimize castToDeclContext for 2% improvement in build times (PR #76825)

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

[clang] Changed Checks from TriviallyCopyable to TriviallyCopyConstructible (PR #76680)

2024-01-03 Thread Vlad Serebrennikov via cfe-commits
@@ -2644,6 +2644,49 @@ bool QualType::isTriviallyCopyableType(const ASTContext ) const { return false; } +bool QualType::isTriviallyCopyConstructibleType( Endilll wrote: Go ahead, but it would be nice if we don't regress performance along the way (by

[clang] Changed Checks from TriviallyCopyable to TriviallyCopyConstructible (PR #76680)

2024-01-01 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: > Sure I can , I have also tested the code that was giving erroneous warnings, > so should I add that example as well?? Yes. Clang has a special mode which check which diagnostics are emitted: https://clang.llvm.org/docs/InternalsManual.html#verifying-diagnostics

[clang] Changed Checks from TriviallyCopyable to TriviallyCopyConstructible (PR #76680)

2024-01-01 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: Can you add some tests? https://github.com/llvm/llvm-project/pull/76680 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Correctly implement CWG 2672 (PR #75001)

2023-12-29 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: DR test changes look good to me, but wait for another reviewer. https://github.com/llvm/llvm-project/pull/75001 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][wasm] Resolve assertion errors caused by converting ComplexTy… (PR #70496)

2023-12-15 Thread Vlad Serebrennikov via cfe-commits
@@ -0,0 +1,9 @@ +// RUN: %clang --target=wasm32 -mmultivalue -Xclang -target-abi -Xclang experimental-mv %s -S -Xclang -verify + +float crealf() { return 0;} // expected-no-diagnostics Endilll wrote: Sorry, I actually meant that you can do like

[clang] [clang][wasm] Resolve assertion errors caused by converting ComplexTy… (PR #70496)

2023-12-15 Thread Vlad Serebrennikov via cfe-commits
@@ -0,0 +1,9 @@ +// RUN: %clang --target=wasm32 -mmultivalue -Xclang -target-abi -Xclang experimental-mv %s -S -Xclang -verify + +float crealf() { return 0;} // expected-no-diagnostics Endilll wrote: Single `expected-no-diagnostics` is sufficient for the whole

[clang] [clang][wasm] Resolve assertion errors caused by converting ComplexTy… (PR #70496)

2023-12-14 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: Can you add a test for this? https://github.com/llvm/llvm-project/pull/70496 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Clang][IR] add TBAA metadata on pointer, union and array types. (PR #75177)

2023-12-14 Thread Vlad Serebrennikov via cfe-commits
@@ -1,7 +1,7 @@ -// RUN: %clang_cc1 -triple x86_64-linux -std=c++98 %s -O3 -disable-llvm-passes -pedantic-errors -emit-llvm -o - | FileCheck %s Endilll wrote: Can you explain why `-disable-llvm-passes` is there, and why is can be removed now?

[mlir] [llvm] [libcxx] [clang] [llvm][Support] Enable `TimeTraceProfiler` to accept deferred detail string (PR #74935)

2023-12-09 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll converted_to_draft https://github.com/llvm/llvm-project/pull/74935 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[llvm] [clang] [mlir] [libcxx] [llvm][Support] Enable `TimeTraceProfiler` to accept deferred detail string (PR #74935)

2023-12-09 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/74935 >From 4e8f48947d59474e07e08cdc98e4a6fb2e3c80c1 Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Sat, 9 Dec 2023 17:21:35 +0300 Subject: [PATCH 1/2] [llvm][Support] Enable `TimeTraceProfiler` to accept

[clang] [clang] Fix '__cdecl' CC is not supported for this target (PR #74932)

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

[clang] [clang] Fix '__cdecl' CC is not supported for this target (PR #74932)

2023-12-09 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll approved this pull request. LGTM, but let's wait for CI to pass. https://github.com/llvm/llvm-project/pull/74932 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [clang-cl] Add support for [[msvc::constexpr]] C++11 attribute (PR #71300)

2023-12-09 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll commented: Some bots are not happy with one of the tests. I contacted you on Discord about your next steps. I'll have to revert the patch if I won't hear from you soon. https://github.com/llvm/llvm-project/pull/71300 ___

[clang] [clang-cl] Add support for [[msvc::constexpr]] C++11 attribute (PR #71300)

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

[clang] [clang-cl] Add support for [[msvc::constexpr]] C++11 attribute (PR #71300)

2023-12-09 Thread Vlad Serebrennikov via cfe-commits
@@ -0,0 +1,16 @@ +// RUN: %clang_cc1 -fms-compatibility -fms-compatibility-version=19.33 -std=c++20 -verify=supported %s Endilll wrote: Judging by the failure https://lab.llvm.org/buildbot/#/builders/60/builds/15037, you might want to test for specific

[clang] [clang-cl] Add support for [[msvc::constexpr]] C++11 attribute (PR #71300)

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

[clang] [clang][NFC] Refactor expected directives in C++ DRs 2000-2799 (PR #74921)

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

[clang] [clang] Adjust TargetInfo bitfield (PR #74893)

2023-12-09 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll approved this pull request. https://github.com/llvm/llvm-project/pull/74893 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Adjust TargetInfo bitfield (PR #74893)

2023-12-09 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: Yeah, I shouldn't have annotated this bit-field. Nice catch! https://github.com/llvm/llvm-project/pull/74893 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][NFC] Refactor expected directives in C++ DRs 2000-2799 (PR #74921)

2023-12-09 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: This PR is created to check the patch against CI. https://github.com/llvm/llvm-project/pull/74921 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][NFC] Refactor expected directives in C++ DRs 2000-2799 (PR #74921)

2023-12-09 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll created https://github.com/llvm/llvm-project/pull/74921 This patch continues the work started with ea5b1ef016d020c37f903d6c7d4f623be975dab8. See that commit and its corresponding PR for details. >From 436502773b1720e0511f4371c7a04079e7d38215 Mon Sep 17 00:00:00

[clang] 57eb205 - [clang][NFC] Fill in historical data on when C++ DRs 2000-2799 were fixed

2023-12-09 Thread Vlad Serebrennikov via cfe-commits
Author: Vlad Serebrennikov Date: 2023-12-09T11:12:54+03:00 New Revision: 57eb2054e308da7fb394375dedf8d7b627d1b528 URL: https://github.com/llvm/llvm-project/commit/57eb2054e308da7fb394375dedf8d7b627d1b528 DIFF:

[clang] [clang][NFC] Refactor expected directives in C++ DRs 700-1999 (PR #74767)

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

[clang] [clang][NFC] Refactor expected directives in C++ DRs 700-1999 (PR #74767)

2023-12-07 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: This PR is created to check the patch against CI. https://github.com/llvm/llvm-project/pull/74767 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] c79f94d - [clang][NFC] Fill in historical data on when C++ DRs 700-1999 were fixed

2023-12-07 Thread Vlad Serebrennikov via cfe-commits
Author: Vlad Serebrennikov Date: 2023-12-08T00:38:42+03:00 New Revision: c79f94d85121347d28f894d837f173f90f368e92 URL: https://github.com/llvm/llvm-project/commit/c79f94d85121347d28f894d837f173f90f368e92 DIFF:

[clang] [clang] Strict aliasing warning ala GCC [PR50066] (PR #74155)

2023-12-06 Thread Vlad Serebrennikov via cfe-commits
@@ -498,3 +498,137 @@ CodeGenTBAA::mergeTBAAInfoForMemoryTransfer(TBAAAccessInfo DestInfo, // access type regardless of their base types. return TBAAAccessInfo::getMayAliasInfo(); } + +// Determine the aliasing kind bit-converting from type Src to type Dst.

[clang] [clang] Strict aliasing warning ala GCC [PR50066] (PR #74155)

2023-12-06 Thread Vlad Serebrennikov via cfe-commits
@@ -37,6 +38,27 @@ class ASTConsumer { friend class SemaConsumer; +public: + /// Allow type-based aliasing information to be interrogated by the AST + /// producer (for diagnostics). + class TypeAliasing { Endilll wrote: Sorry I didn't make myself

[clang] [clang] Strict aliasing warning ala GCC [PR50066] (PR #74155)

2023-12-06 Thread Vlad Serebrennikov via cfe-commits
@@ -498,3 +498,137 @@ CodeGenTBAA::mergeTBAAInfoForMemoryTransfer(TBAAAccessInfo DestInfo, // access type regardless of their base types. return TBAAAccessInfo::getMayAliasInfo(); } + +// Determine the aliasing kind bit-converting from type Src to type Dst.

[clang] Move documentation about -verify from a header to public docs (PR #73694)

2023-12-06 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: It would also be nice to fix the link to full `-verify` docs in https://clang.llvm.org/docs/InternalsManual.html#the-diagnosticconsumer-interface https://github.com/llvm/llvm-project/pull/73694 ___ cfe-commits mailing list

[clang] Move documentation about -verify from a header to public docs (PR #73694)

2023-12-06 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: @AaronBallman After moving the docs, none of the code blocks are rendering: https://clang.llvm.org/docs/InternalsManual.html#verifying-diagnostics https://github.com/llvm/llvm-project/pull/73694 ___ cfe-commits mailing list

[clang] [clang][NFC] Refactor expected directives in C++ DRs 600-699 (PR #74477)

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

[clang] [clang][NFC] Refactor expected directives in C++ DRs 600-699 (PR #74477)

2023-12-05 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/74477 >From 12cc446ecd55936518cb3e8b13c4840bc008d2c8 Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Tue, 5 Dec 2023 17:14:37 +0300 Subject: [PATCH 1/3] [clang][NFC] Refactor expected directives in C++ DRs

[clang] [clang][NFC] Refactor expected directives in C++ DRs 600-699 (PR #74477)

2023-12-05 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/74477 >From 12cc446ecd55936518cb3e8b13c4840bc008d2c8 Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Tue, 5 Dec 2023 17:14:37 +0300 Subject: [PATCH 1/2] [clang][NFC] Refactor expected directives in C++ DRs

[clang] [clang][NFC] Refactor expected directives in C++ DRs 600-699 (PR #74477)

2023-12-05 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: This PR is created to check the patch against CI. https://github.com/llvm/llvm-project/pull/74477 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][NFC] Refactor expected directives in C++ DRs 600-699 (PR #74477)

2023-12-05 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll created https://github.com/llvm/llvm-project/pull/74477 [clang][NFC] Refactor expected directives in C++ DRs 600-699 This patch continues the work started with https://github.com/llvm/llvm-project/commit/ea5b1ef016d020c37f903d6c7d4f623be975dab8. See that commit and

[clang] 94708fb - [clang][NFC] Fill in historical data on when C++ DRs 600-699 were fixed

2023-12-05 Thread Vlad Serebrennikov via cfe-commits
Author: Vlad Serebrennikov Date: 2023-12-05T17:16:10+03:00 New Revision: 94708fbc0fa06b18c9b263ecb78d20a95a194e7f URL: https://github.com/llvm/llvm-project/commit/94708fbc0fa06b18c9b263ecb78d20a95a194e7f DIFF:

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