[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 tests for DRs about inheriting constructors (PR #79981)

2024-01-31 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/79981 >From 634c7d1a1205c9d047f8b3000cb93128a278006f Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Tue, 30 Jan 2024 14:01:11 +0300 Subject: [PATCH 1/2] [clang] Add tests for DRs about inheriting constructors

[clang] [clang] Add tests for DRs about inheriting constructors (PR #79981)

2024-01-31 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll edited https://github.com/llvm/llvm-project/pull/79981 ___ 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 inheriting constructors (PR #79981)

2024-01-31 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: To be honest, I'm not keen on the idea of filing bug tracker issues for problems accounted for in other way (DR status, `FIXME`), until we get bug tracker in a good shape, or at least have an understanding how project management side of things is going to look. > Is there anyth

[clang] [clang] Add tests for DRs about inheriting constructors (PR #79981)

2024-01-31 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/79981 >From 634c7d1a1205c9d047f8b3000cb93128a278006f Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Tue, 30 Jan 2024 14:01:11 +0300 Subject: [PATCH 1/3] [clang] Add tests for DRs about inheriting constructors

[clang] [clang] Add tests for DRs about inheriting constructors (PR #79981)

2024-01-31 Thread Vlad Serebrennikov via cfe-commits
@@ -0,0 +1,33 @@ +// 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 1xx issues (PR #80338)

2024-02-01 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll created https://github.com/llvm/llvm-project/pull/80338 Covers CWG issues [185](https://cplusplus.github.io/CWG/issues/185.html), [193](https://cplusplus.github.io/CWG/issues/193.html), [199](https://cplusplus.github.io/CWG/issues/199.html). I also looked at [190](htt

[clang] [clang][Diagnostics] Highlight code snippets (PR #66514)

2024-02-01 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: @eaeltsin I'm against reverting this or introducing a switch until we get a reproducer (or author figures out what's wrong). I believe it's a very worthwhile feature, and we want some actionable feedback to improve it. Author has been very responsive so far, so we are good on t

[clang] [clang][Diagnostics] Highlight code snippets (PR #66514)

2024-02-01 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: > For us, these crashes block a solid piece of internal testing, thus new > unnoticed errors accumulate and make things exponentially harder for the > future. If you have a solid piece of internal testing blocked by this, can you provide us with more data? Ideally a working rep

[clang] [clang] Fix a possible out-of-bounds read (PR #80023)

2024-02-01 Thread Vlad Serebrennikov via cfe-commits
Timm =?utf-8?q?Bäder?= Message-ID: In-Reply-To: @@ -109,6 +109,7 @@ class ByteCodeExprGen : public ConstStmtVisitor, bool>, bool VisitCXXScalarValueInitExpr(const CXXScalarValueInitExpr *E); bool VisitSizeOfPackExpr(const SizeOfPackExpr *E); bool VisitGenericSelection

[clang] [clang] Fix a possible out-of-bounds read (PR #80023)

2024-02-01 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll approved this pull request. https://github.com/llvm/llvm-project/pull/80023 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Update documentation for `#pragma diagnostic` (PR #78095)

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

[clang] [clang][Diagnostics] Highlight code snippets (PR #66514)

2024-02-02 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: @bgra8 Thank you! This is helpful. > The problem is extremely hard to reduce as it happens during preprocessing > and even removing unrelated headers causes the crash to disappear. Yeah, crashes happening at this stage can easily be insane to reduce manually. > This crash is bl

[clang] [clang][Diagnostics] Highlight code snippets (PR #66514)

2024-02-02 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: > > As mentioned above, `-fno-color-diagnostics` is the flag you can deploy > > internally this very moment. > > Disabling color diagnostics would make the job of other software engineers > harder, right? This hammer is a bit too big for the problem at hand, right? I thought we

[clang] [clang][Diagnostics] Highlight code snippets (PR #66514)

2024-02-02 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: > We can't push internally a compiler that crashes unless we disable color > diagnostics. I hope you realize this is self-imposed limitation that Clang community doesn't necessary have to respect. https://github.com/llvm/llvm-project/pull/66514 _

[clang-tools-extra] [llvm] [clang] [Clang] Fix : More Detailed "No expected directives found" (PR #78338)

2024-02-04 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: > gentle ping. Please check the mergeability of this PR. Friendly reminder of one ping per week policy. https://github.com/llvm/llvm-project/pull/78338 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-b

[clang] [llvm] [clang-tools-extra] [Clang] Fix : More Detailed "No expected directives found" (PR #78338)

2024-02-06 Thread Vlad Serebrennikov via cfe-commits
@@ -179,7 +179,7 @@ def err_verify_invalid_no_diags : Error< "%select{expected|'expected-no-diagnostics'}0 directive cannot follow " "%select{'expected-no-diagnostics' directive|other expected directives}0">; Endilll wrote: @Sh0g0-1758 Please have patie

[clang-tools-extra] [clang] [llvm] [Clang] Fix : More Detailed "No expected directives found" (PR #78338)

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

[clang-tools-extra] [clang] [llvm] [Clang] Add some CodeGen tests for CWG 2xx issues (PR #80823)

2024-02-06 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll created https://github.com/llvm/llvm-project/pull/80823 This patch covers CWG issues [201](https://cplusplus.github.io/CWG/issues/201.html), [210](https://cplusplus.github.io/CWG/issues/210.html), [292](https://cplusplus.github.io/CWG/issues/292.html). [CWG208](https:

[clang] [llvm] [clang-tools-extra] [Clang] Add some CodeGen tests for CWG 2xx issues (PR #80823)

2024-02-06 Thread Vlad Serebrennikov via cfe-commits
@@ -0,0 +1,43 @@ +// RUN: %clang_cc1 -std=c++98 %s -triple x86_64-linux-gnu -emit-llvm -disable-llvm-passes -O0 -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

[clang-tools-extra] [clang] [llvm] [Clang] Add some CodeGen tests for CWG 2xx issues (PR #80823)

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

[clang-tools-extra] [clang] [llvm] [Clang] Add some CodeGen tests for CWG 2xx issues (PR #80823)

2024-02-06 Thread Vlad Serebrennikov via cfe-commits
@@ -0,0 +1,38 @@ +// RUN: %clang_cc1 -std=c++98 %s -triple x86_64-linux-gnu -emit-llvm -disable-llvm-passes -O0 -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

[llvm] [clang] [clang-tools-extra] [Clang] Add some CodeGen tests for CWG 2xx issues (PR #80823)

2024-02-06 Thread Vlad Serebrennikov via cfe-commits
@@ -0,0 +1,43 @@ +// RUN: %clang_cc1 -std=c++98 %s -triple x86_64-linux-gnu -emit-llvm -disable-llvm-passes -O0 -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

[clang] [libclang/python] Expose Rewriter to the python binding (PR #77269)

2024-01-24 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: @linux4life798 Can you review the last update? https://github.com/llvm/llvm-project/pull/77269 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFC][IdentifierInfo] Use llvm::Bitfield for the bitfield (PR #79366)

2024-01-24 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: I find `llvm::Bitfield` API with all its explicit setters with explicit storage parameter clunky compared to language bit-fields. But that's minor. My major issue with this patch is that `uint64_t Storage;` is as opaque for debuggers as it gets. It would take so much work to cor

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

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

[clang] [clang][Sema] Add checks for validity of default ctor's class (PR #78898)

2024-01-25 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/78898 >From b99a75a8756a7841657fc78ffbd40f780a412f2b Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Sun, 21 Jan 2024 16:26:29 +0300 Subject: [PATCH 1/2] [clang][Sema] Add checks for validity of default ctor's

[clang-tools-extra] [llvm] [clang] [clang][Sema] Add checks for validity of default ctor's class (PR #78898)

2024-01-25 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/78898 >From b99a75a8756a7841657fc78ffbd40f780a412f2b Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Sun, 21 Jan 2024 16:26:29 +0300 Subject: [PATCH 1/2] [clang][Sema] Add checks for validity of default ctor's

[clang] [clang-tools-extra] [compiler-rt] [llvm] [clang][Sema] Add checks for validity of default ctor's class (PR #78898)

2024-01-25 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/78898 >From b99a75a8756a7841657fc78ffbd40f780a412f2b Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Sun, 21 Jan 2024 16:26:29 +0300 Subject: [PATCH 1/2] [clang][Sema] Add checks for validity of default ctor's

[clang-tools-extra] [clang] [compiler-rt] [llvm] [clang][Sema] Add checks for validity of default ctor's class (PR #78898)

2024-01-25 Thread Vlad Serebrennikov via cfe-commits
@@ -0,0 +1,22 @@ +// RUN: %clang_cc1 -verify -std=c++98 %s +// RUN: %clang_cc1 -verify -std=c++11 %s +// RUN: %clang_cc1 -verify -std=c++14 %s +// RUN: %clang_cc1 -verify -std=c++17 %s +// RUN: %clang_cc1 -verify -std=c++20 %s +// RUN: %clang_cc1 -verify -std=c++23 %s +// RUN: %cl

[clang] [NFC][IdentifierInfo] Use llvm::Bitfield for the bitfield (PR #79366)

2024-01-26 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: > It shouldn't be necessary to analyze uint64_t Storage directly through a > debugger. It's handled via the Bitfield getters and setters. Is that not > sufficient for debugging purposes? Unfortunately, it's not. Not every debugger can run getters while displaying the value (e.g

[clang] [clang][Diagnostics] Highlight code snippets (PR #66514)

2024-01-30 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: The deep shade of blue doesn't make sense for both light and dark backgrounds: ![image](https://github.com/llvm/llvm-project/assets/12883766/e9ee6658-1ab1-422f-914b-5f95cac3846d) ![image](https://github.com/llvm/llvm-project/assets/12883766/986ae6f4-2fa9-4d2a-b661-47de3bf92cde) It

[clang] [clang][Diagnostics] Highlight code snippets (PR #66514)

2024-01-30 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: It looks a tinybit better in my local terminal, but still significantly harder to read than the rest of the text: ![image](https://github.com/llvm/llvm-project/assets/12883766/5b0136a5-012b-47f5-b888-787d1c060d54) But it's a bit off the point. We should pick colors that have good

[clang] [clang][Diagnostics] Highlight code snippets (PR #66514)

2024-01-30 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: Ah, I see where the limitation comes from. According to [Wikipedia](https://en.wikipedia.org/wiki/ANSI_escape_code#3-bit_and_4-bit), there is bright blue color which many terminals display differently from regular blue. While this means we're expanding 3-bit color palette to 4-b

[clang] [clang][Diagnostics] Highlight code snippets (PR #66514)

2024-01-30 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: I also got in touch with Compiler Explorer devs. They should be able to pick a better color to render ANSI blue. https://github.com/llvm/llvm-project/pull/66514 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.

[clang] [clang] Add tests for DRs about inheriting constructors (PR #79981)

2024-01-30 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll created https://github.com/llvm/llvm-project/pull/79981 Covers CWG issues 1150, 1487, 1567, 1738, 2273, 2277, 2356, 2504. On top of the wording in proposed resolutions, [P0136R1](https://wg21.link/p0136r1) "Rewording inheriting constructors (core issue 1941 et al)"

[clang-tools-extra] [clang-tidy] Add bugprone-move-shared-pointer-contents check. (PR #67467)

2024-01-11 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: I cleaned up the reviewers. I suggest to use `git merge` next time you need to bring your PR up to date with `main`. We are not worried about merge commits, as squash is the only available merge option for PRs. I also suggest to use "Start review" button when you respond to mult

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

2024-01-12 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/5] [clang] Add test for CWG1807 The test checks that objec

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

2024-01-12 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/6] [clang] Add test for CWG1807 The test checks that objec

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

2024-01-12 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/7] [clang] Add test for CWG1807 The test checks that objec

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

2024-01-12 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: Following the suggestion from @nikic, I prepared two variants of the same test, one hard-written, and one using `update_cc_test_checks.py` (with heavy manual editing afterwards). Hand-written: ``` // CHECK-LABEL: define dso_local void @dr1807::f() // CHECK: invo

[clang] [clang-tools-extra] [compiler-rt] [flang] [llvm] [clang] Add test for CWG1807 (PR #77637)

2024-01-12 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/7] [clang] Add test for CWG1807 The test checks that objec

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

2024-01-12 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; // since-cxx11-note 2 {{has been explicitly marked deleted here}} + }; +

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

2024-01-12 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

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

2024-01-12 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll edited 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

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

2024-01-12 Thread Vlad Serebrennikov via cfe-commits
@@ -2871,7 +2871,7 @@ C++ defect report implementation status https://cplusplus.github.io/CWG/issues/472.html";>472 drafting Casting across protected inheritance -Not resolved +No Endilll wrote: Current state of things is my fault (I was t

[clang] [clang] Add test for CWG1350 (PR #78040)

2024-01-13 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll created https://github.com/llvm/llvm-project/pull/78040 Test is based on [P0136R1](https://wg21.link/p0136r1) wording instead of proposed resolution in the issue itself. This patch also expands related CWG1573 test with an additional test case. Existing `3.9` status

[clang] [clang] Add test for CWG1350 (PR #78040)

2024-01-13 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: I was way too deep into P0136R1 [Rewording inheriting constructors (core issue 1941 et al)](https://wg21.link/p0136r1) when I realized Richard has written tests for all issues covered there long ago. So I decided to carry on and check whether those tests would benefit from addit

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

2024-01-13 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll approved this pull request. Looks perfect to me now. Thank you! 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-commi

[clang] [clang] Add test for CWG1350 (PR #78040)

2024-01-13 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/78040 >From 62620337b64c64535d76c5003f9acd450ab527f7 Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Sat, 13 Jan 2024 17:32:37 +0300 Subject: [PATCH 1/2] [clang] Add test for CWG1350 Test is based on [P0136R1]

[lldb] [clang-tools-extra] [clang] [c++20] P1907R1: Support for generalized non-type template arguments of scalar type. (PR #78041)

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

[clang-tools-extra] [clang] [lldb] [c++20] P1907R1: Support for generalized non-type template arguments of scalar type. (PR #78041)

2024-01-13 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll commented: C++ DR test changes look good to me. https://github.com/llvm/llvm-project/pull/78041 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[lldb] [clang-tools-extra] [clang] [c++20] P1907R1: Support for generalized non-type template arguments of scalar type. (PR #78041)

2024-01-13 Thread Vlad Serebrennikov via cfe-commits
@@ -25,7 +25,7 @@ template struct S {}; // #dr1801-S S V; // #dr1801-S-i // cxx98-14-error@-1 {{non-type template argument does not refer to any declaration}} // cxx98-14-note@#dr1801-S {{template parameter is declared here}} -// since-cxx17-error@#dr1801-S-i {{non-type tem

[clang] [SemaCXX] Implement CWG2351 `void{}` (PR #78060)

2024-01-13 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll commented: DR testing part looks fine. I'm worried there are no regular tests. It's also not clear what happens in 98 mode. New code doesn't seem to care about language mode. https://github.com/llvm/llvm-project/pull/78060 _

[clang] [SemaCXX] Implement CWG2351 `void{}` (PR #78060)

2024-01-13 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: > Initializer list syntax isn't available in C++98 mode (even as an extension? > I can't find the option) I'm not confident enough to properly review your changes, but my line of thinking is the following: `void()` is available in all language modes, but you're adding C++11-spe

[clang] [SemaCXX] Implement CWG2351 `void{}` (PR #78060)

2024-01-13 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: > Looking at other places, it looks like init-list stuff is guarded behind > getLangOpts().CPlusPlus11, so I'll add that check. Corentin told me offline that check for list initialization that you do might be sufficient, as it can't pass in 98. > It looks like this DR is CD5 (a

[clang] [SemaCXX] Implement CWG2351 `void{}` (PR #78060)

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

[clang] [clang] Add test for CWG1350 (PR #78040)

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

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

2024-01-13 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: CI fails on formatting in unrelated files, so I'm going to ignore it: ``` t=1704988008448 + echo '*** Checking for trailing whitespace left in Clang source files ***' t=1704988008448 *** Checking for trailing whitespace left in Clang source files *** t=1704988008448 + grep -rnI '

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

2024-01-13 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll closed 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] Remove outdated parts of documentation for #pragma diagnostic (PR #78095)

2024-01-14 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll created https://github.com/llvm/llvm-project/pull/78095 GCC has changed over the past decade. Fixes #51472 >From 1aca1cd3be8209675b8aa3b79b2d626ad9f3c559 Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Sun, 14 Jan 2024 14:11:16 +0300 Subject: [PATCH] [clang]

[clang] [clang] Implement CWG1878 "`operator auto` template" (PR #78103)

2024-01-14 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll created https://github.com/llvm/llvm-project/pull/78103 C++14 introduced deduced return type for regular functions, but shortly after [CWG1878](https://wg21.link/cwg1878) was filed and resolved to disallow deduced return types in conversion function templates. So thi

[clang] [clang] Implement CWG1878 "`operator auto` template" (PR #78103)

2024-01-14 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/78103 >From 522c7dff31a6f63995877674f9f4282ae60f7aaa Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Sun, 14 Jan 2024 19:45:04 +0300 Subject: [PATCH 1/2] [clang] Implement CWG1878 "`operator auto` template" C+

[clang] [clang] Implement CWG1878 "`operator auto` template" (PR #78103)

2024-01-14 Thread Vlad Serebrennikov via cfe-commits
@@ -11322,9 +11322,22 @@ Decl *Sema::ActOnConversionDeclarator(CXXConversionDecl *Conversion) { << ClassType << ConvType; } - if (FunctionTemplateDecl *ConversionTemplate -= Conversion->getDescribedFunctionTemplate()) + if (FunctionTe

[clang] [clang][docs] Improve "Obtaining Clang" section (PR #71313)

2024-01-14 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: LGTM, but wair for other reviewers. https://github.com/llvm/llvm-project/pull/71313 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[lldb] [clang] [clang-tools-extra] [c++20] P1907R1: Support for generalized non-type template arguments of scalar type. (PR #78041)

2024-01-15 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: > The logic is that this is a pretty big hole in our C++20 support and I don't > think it's reasonable to try a merge after the deadline for 18. WDYT? >From our past experience with release managers, they seem quite generous with >deadlines to merge stuff in, as long as maintain

[clang] [clang] Remove outdated parts of documentation for #pragma diagnostic (PR #78095)

2024-01-15 Thread Vlad Serebrennikov via cfe-commits
@@ -1157,19 +1156,16 @@ existed. #if foo #endif foo // warning: extra tokens at end of #endif directive - #pragma clang diagnostic push - #pragma clang diagnostic ignored "-Wextra-tokens" + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wextra-tokens"

[clang] [clang] Refactor `IdentifierInfo::ObjcOrBuiltinID` (PR #71709)

2024-01-16 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: Yeah, I remember I was able to get past the first round of test failures, only to find another one waiting for me. Once again I need to sit and debug AST serizalization and deserialization, but I've been occupied with other stuff since then. I'm not giving up on this just yet, as

[clang] [llvm] [GitHub] Add python 3.7 to libclang python test (PR #77219)

2024-01-16 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll approved this pull request. LGTM. I believe we can go ahead with this even if discussion about raising minimum Python version is not going anywhere. Better test 3.7 and 3.11 than just 3.11 anyway. https://github.com/llvm/llvm-project/pull/77219 __

[clang] [clang] Remove outdated parts of documentation for #pragma diagnostic (PR #78095)

2024-01-17 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/78095 >From 1aca1cd3be8209675b8aa3b79b2d626ad9f3c559 Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Sun, 14 Jan 2024 14:11:16 +0300 Subject: [PATCH 1/3] [clang] Remove outdated parts of documentation for #pra

[clang] [clang] Remove outdated parts of documentation for #pragma diagnostic (PR #78095)

2024-01-17 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: I documented that we don't support unpaired `pop` (tracked in #23065) and enabling diagnostics that are not enabled via CLI (tracked in #78418). https://github.com/llvm/llvm-project/pull/78095 ___ cfe-commits mailing list cfe-commits@li

[clang] [libclang/python] Expose Rewriter to the python binding (PR #77269)

2024-01-17 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll commented: Looks good overall. It's good that you wrote your own tests, but it would also be nice to mirror tests in `clang/unittests/libclang/LibclangTest.cpp` which test the same API. This way we can identify issues in binding layer itself (when C++ tests pass, but

[clang] Warning for incorrect useof 'pure' attribute (PR #78200)

2024-01-17 Thread Vlad Serebrennikov via cfe-commits
@@ -11792,6 +11792,32 @@ static bool CheckMultiVersionFunction(Sema &S, FunctionDecl *NewFD, OldDecl, Previous); } +static void CheckFunctionDeclarationAttributesUsage(Sema &S, +Funct

[clang] Warning for incorrect useof 'pure' attribute (PR #78200)

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

[clang] Warning for incorrect useof 'pure' attribute (PR #78200)

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

[clang] [clang-tools-extra] [clang][NFC] Refactor `CXXNewExpr::InitializationStyle` (re-land) (PR #71417)

2024-01-18 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: > I'd qualify this as a regression, by looking at that the commit was supposed > to be an NFC. Could you please confirm @Endilll? I'll leave to @AaronBallman to decide whether this is a functional change, but I can confirm that patch is working as intended, because there is an i

[clang] [clang-tools-extra] [clang][NFC] Refactor `CXXNewExpr::InitializationStyle` (re-land) (PR #71417)

2024-01-18 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: > I agree this stretches the definition of NFC commit. But it was dully reviewed and approved https://github.com/llvm/llvm-project/pull/71322 I agree with this assessment. I think it really started as regular NFC, but then me and Aaron realized that we can get rid of some ugly c

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

2024-01-18 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll approved this pull request. 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-tools-extra] [clang][NFC] Refactor `CXXNewExpr::InitializationStyle` (re-land) (PR #71417)

2024-01-18 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: > The enum we had in the past described the syntax of the new expression. Even if it was the case at some point, I'm not sure it held when I created the PR, which eliminated this kind of nasty mapping, encoding how this enum was actually used: ```cpp CXXNewExprBits.StoredInitia

[clang] [clang] Implement CWG1878 "`operator auto` template" (PR #78103)

2024-01-18 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/78103 >From 522c7dff31a6f63995877674f9f4282ae60f7aaa Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Sun, 14 Jan 2024 19:45:04 +0300 Subject: [PATCH 1/4] [clang] Implement CWG1878 "`operator auto` template" C+

[clang] [clang] Implement CWG1878 "`operator auto` template" (PR #78103)

2024-01-18 Thread Vlad Serebrennikov via cfe-commits
@@ -686,3 +686,19 @@ auto f(auto x) { // cxx14-error {{'auto' not allowed in function prototype}} } } + +struct DeducedTargetTypeOfConversionFunction { + operator auto() const { return char(); } + operator const auto() const { return float(); } Endilll wrot

[clang] [clang] Implement CWG1878 "`operator auto` template" (PR #78103)

2024-01-18 Thread Vlad Serebrennikov via cfe-commits
@@ -11322,9 +11322,22 @@ Decl *Sema::ActOnConversionDeclarator(CXXConversionDecl *Conversion) { << ClassType << ConvType; } - if (FunctionTemplateDecl *ConversionTemplate -= Conversion->getDescribedFunctionTemplate()) + if (FunctionTe

[clang-tools-extra] [clang] [llvm] [clang] Implement CWG1878 "`operator auto` template" (PR #78103)

2024-01-18 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/78103 >From 522c7dff31a6f63995877674f9f4282ae60f7aaa Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Sun, 14 Jan 2024 19:45:04 +0300 Subject: [PATCH 1/4] [clang] Implement CWG1878 "`operator auto` template" C+

[flang] [clang] [compiler-rt] [clang-tools-extra] [llvm] [clang] Add test for CWG1807 (PR #77637)

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

[clang-tools-extra] [llvm] [clang] [clang] Implement CWG1878 "`operator auto` template" (PR #78103)

2024-01-18 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/78103 >From 522c7dff31a6f63995877674f9f4282ae60f7aaa Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Sun, 14 Jan 2024 19:45:04 +0300 Subject: [PATCH 1/5] [clang] Implement CWG1878 "`operator auto` template" C+

[clang-tools-extra] [llvm] [clang] [clang] Implement CWG1878 "`operator auto` template" (PR #78103)

2024-01-18 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/78103 >From 522c7dff31a6f63995877674f9f4282ae60f7aaa Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Sun, 14 Jan 2024 19:45:04 +0300 Subject: [PATCH 1/6] [clang] Implement CWG1878 "`operator auto` template" C+

[clang] [Clang][Sema] Diagnose use of template keyword after declarative nested-name-specifiers (PR #78595)

2024-01-18 Thread Vlad Serebrennikov via cfe-commits
@@ -182,8 +182,8 @@ struct Bad2 { int a, b; }; } // namespace dr2386 namespace std { template struct tuple_size; -template <> struct std::tuple_size {}; Endilll wrote: Is this a really necessary change? https://github.com/llvm/llvm-project/pull/78595 ___

[clang] [Clang][Sema] Diagnose use of template keyword after declarative nested-name-specifiers (PR #78595)

2024-01-18 Thread Vlad Serebrennikov via cfe-commits
@@ -182,8 +182,8 @@ struct Bad2 { int a, b; }; } // namespace dr2386 namespace std { template struct tuple_size; -template <> struct std::tuple_size {}; Endilll wrote: Is this warning emitted if we spell it `::std::tuple)size`? https://github.com/llvm/llvm-p

[clang] [Clang][Sema] Diagnose use of template keyword after declarative nested-name-specifiers (PR #78595)

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

[clang] 30da0f5 - [clang] Pass `-n` to llvm-cxxfilt in codegen tests

2024-01-18 Thread Vlad Serebrennikov via cfe-commits
Author: Vlad Serebrennikov Date: 2024-01-18T20:25:18+03:00 New Revision: 30da0f5a359ab4a684c5fdf0f4dbed20bae10f99 URL: https://github.com/llvm/llvm-project/commit/30da0f5a359ab4a684c5fdf0f4dbed20bae10f99 DIFF: https://github.com/llvm/llvm-project/commit/30da0f5a359ab4a684c5fdf0f4dbed20bae10f99.

[clang-tools-extra] [flang] [clang] [compiler-rt] [llvm] [clang] Add test for CWG1807 (PR #77637)

2024-01-18 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: @nico I tried to address this in 30da0f5a359ab4a684c5fdf0f4dbed20bae10f99 https://github.com/llvm/llvm-project/pull/77637 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] a7588bb - [clang] Pass `-n` to llvm-cxxfilt in even more codegen tests

2024-01-18 Thread Vlad Serebrennikov via cfe-commits
Author: Vlad Serebrennikov Date: 2024-01-18T22:22:38+03:00 New Revision: a7588bb9bab43420f1c2642c80489f74af88f855 URL: https://github.com/llvm/llvm-project/commit/a7588bb9bab43420f1c2642c80489f74af88f855 DIFF: https://github.com/llvm/llvm-project/commit/a7588bb9bab43420f1c2642c80489f74af88f855.

[clang-tools-extra] [flang] [clang] [llvm] [compiler-rt] [clang] Add test for CWG1807 (PR #77637)

2024-01-18 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: @mysterymath It's a bit of a shame to admit that I missed the first half of RUN lines in the previous follow-up. Should be fixed now by a7588bb9bab43420f1c2642c80489f74af88f855 https://github.com/llvm/llvm-project/pull/77637 ___ cfe-co

[clang] [Docs][Clang] Missing DR status for C++23-era papers in cxx_status.html (PR #68846)

2024-01-19 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: @frederick-vs-ja PR description is going to be used as a commit message. You can edit it. Let me know when it's ready. https://github.com/llvm/llvm-project/pull/68846 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://list

[clang] [Clang][Sema] Allow elaborated-type-specifiers that declare member class template explict specializations (PR #78720)

2024-01-19 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll commented: Changes to DR tests look good. https://github.com/llvm/llvm-project/pull/78720 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [clang] Remove `CXXNewInitializationStyle::Implicit` (PR #78793)

2024-01-19 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll created https://github.com/llvm/llvm-project/pull/78793 This is a follow up to https://github.com/llvm/llvm-project/pull/71417 , which aims to resolve concerns brought up there. Namely, this patch replaces `CXXNewInitializationStyle::Implicit` with a dedicated `HasIn

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