[clang] [libclang/python] Fix bugs in custom enum implementation and add tests (PR #95381)

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

[clang] [clang] Dump Auto Type Inference (PR #95509)

2024-06-14 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll commented: Thank you for working on this, but I'm not sure this is the right direction. The flag you're proposing is going to add unwieldy amount of remarks if used on a typical translation unit as opposed to a small example, because from what I understand, it dumps

[clang] [clang] Implement CWG2877 "Type-only lookup for using-enum-declarator" (PR #95399)

2024-06-14 Thread Vlad Serebrennikov via cfe-commits
@@ -738,16 +738,47 @@ Parser::DeclGroupPtrTy Parser::ParseUsingDeclaration( return nullptr; } -if (!Tok.is(tok::identifier)) { +Decl *UED = nullptr; + +if (Tok.is(tok::identifier)) { Endilll wrote: 1) You're correct that `ParseOptionalCX

[clang] [Clang] Introduce `CXXTypeidExpr::hasNullCheck` (PR #95718)

2024-06-16 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: You need to run `clang/www/make_cxx_dr_status` script. https://github.com/llvm/llvm-project/pull/95718 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] d340f62 - [clang][NFC] Update C++ DR issues list

2024-06-16 Thread Vlad Serebrennikov via cfe-commits
Author: Vlad Serebrennikov Date: 2024-06-17T00:22:47+03:00 New Revision: d340f6283a3d242bad190ed9b95baa03e5607639 URL: https://github.com/llvm/llvm-project/commit/d340f6283a3d242bad190ed9b95baa03e5607639 DIFF: https://github.com/llvm/llvm-project/commit/d340f6283a3d242bad190ed9b95baa03e5607639.

[clang] [Clang] Introduce `CXXTypeidExpr::hasNullCheck` (PR #95718)

2024-06-16 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: If you update the branch, you should be able to get rid of unrelated changes to `cxx_dr_status.html`. https://github.com/llvm/llvm-project/pull/95718 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin

[clang] [Clang] Introduce `CXXTypeidExpr::hasNullCheck` (PR #95718)

2024-06-16 Thread Vlad Serebrennikov via cfe-commits
@@ -268,6 +268,9 @@ Resolutions to C++ Defect Reports - Clang now requires a template argument list after a template keyword. (`CWG96: Syntactic disambiguation using the template keyword `_). +- Clang no longer always reports

[clang] [Clang] Introduce `CXXTypeidExpr::hasNullCheck` (PR #95718)

2024-06-16 Thread Vlad Serebrennikov via cfe-commits
@@ -15598,7 +15598,7 @@ C++ defect report implementation status https://cplusplus.github.io/CWG/issues/2632.html";>2632 -review +drafting Endilll wrote: Update you branch with the latest `main` changes, and those unrelated changes will go a

[clang] [Clang] Introduce `CXXTypeidExpr::hasNullCheck` (PR #95718)

2024-06-16 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll approved this pull request. DR test looks good, but wait for more approvals. https://github.com/llvm/llvm-project/pull/95718 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listi

[clang] [Clang] Introduce `CXXTypeidExpr::hasNullCheck` (PR #95718)

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

[clang] [Clang] Introduce `CXXTypeidExpr::hasNullCheck` (PR #95718)

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

[clang] [clang][Parser] "Better" error messages for invalid template template (PR #95726)

2024-06-17 Thread Vlad Serebrennikov via cfe-commits
@@ -1145,8 +1145,10 @@ namespace cwg181 { // cwg181: yes namespace X { template > struct A { }; // expected-error@-1 +{{}} +// expected-note@-2 {{did you mean to use 'typename'?}} template > void f(A) { } // expected-error@-1 +{{}} +// expected-n

[clang] [clang][Parser] "Better" error messages for invalid template template (PR #95726)

2024-06-17 Thread Vlad Serebrennikov via cfe-commits
@@ -1145,8 +1145,10 @@ namespace cwg181 { // cwg181: yes namespace X { template > struct A { }; // expected-error@-1 +{{}} +// expected-note@-2 {{did you mean to use 'typename'?}} Endilll wrote: ```suggestion // expected-note@-2 {{did you

[clang] [clang][Parser] "Better" error messages for invalid template template (PR #95726)

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

[clang] [clang][Parser] "Better" error messages for invalid template template (PR #95726)

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

[clang] [clang-tools-extra] [clang] Implement CWG2398 provisional TTP matching to class templates (PR #94981)

2024-06-19 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: Now that you published P3310R0, this test can be moved to DR tests with a status `// cwg2398: 19 drafting P3310R0`. https://github.com/llvm/llvm-project/pull/94981 ___ cfe-commits mailing list cfe-comm

[clang] [clang] Change style of superseded issues on C++ DR status page (PR #96051)

2024-06-19 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll created https://github.com/llvm/llvm-project/pull/96051 This patch changes how superseded issues inherit the color of the issues that superseded them. Now they reduce the opacity of the color from 1.0 to 0.65, to make them distinguishable. This was requested during t

[clang] [clang] Implement CWG2877 "Type-only lookup for using-enum-declarator" (PR #95399)

2024-06-19 Thread Vlad Serebrennikov via cfe-commits
@@ -738,16 +738,47 @@ Parser::DeclGroupPtrTy Parser::ParseUsingDeclaration( return nullptr; } -if (!Tok.is(tok::identifier)) { +Decl *UED = nullptr; + +if (Tok.is(tok::identifier)) { + IdentifierInfo *IdentInfo = Tok.getIdentifierInfo(); + Sourc

[clang] [Clang] Clarify diagnostic notes for implicitly generated deduction guides (PR #96084)

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

[clang] [clang-tools-extra] [clang] Implement CWG2398 provisional TTP matching to class templates (PR #94981)

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

[clang] [clang] Implement CWG2877 "Type-only lookup for using-enum-declarator" (PR #95399)

2024-06-19 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/95399 >From a7b6a8b667d48d8e70f3e5fcbaaa44a72ad885db Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Thu, 13 Jun 2024 14:35:08 +0300 Subject: [PATCH 1/4] [clang] Implement CWG2877 "Type-only lookup for using-e

[clang] [clang] Implement CWG2877 "Type-only lookup for using-enum-declarator" (PR #95399)

2024-06-19 Thread Vlad Serebrennikov via cfe-commits
@@ -738,16 +738,47 @@ Parser::DeclGroupPtrTy Parser::ParseUsingDeclaration( return nullptr; } -if (!Tok.is(tok::identifier)) { +Decl *UED = nullptr; + +if (Tok.is(tok::identifier)) { Endilll wrote: We agreed offline that adding FIXME wou

[clang] [clang] Add test for CWG2811 "Clarify "use" of main" (PR #96168)

2024-06-20 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll created https://github.com/llvm/llvm-project/pull/96168 This patch covers [CWG2811](https://cplusplus.github.io/CWG/issues/2811.html) "Clarify "use" of main", basically adding a test for `-Wmain`, focusing on usages of `main` in unevaluated contexts. To my understan

[clang] [clang] Change style of superseded issues on C++ DR status page (PR #96051)

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

[clang] [clang] Add test for CWG2811 "Clarify "use" of main" (PR #96168)

2024-06-20 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: > it's clearer that it's not conforming (at the very least we should say > something like "clang extension" As someone who was a user of Clang not so long ago, I have to say that the only thing "ISO C++ requires" conveyed to me was "you're doing something wrong". For me it neve

[clang] [clang] Cover CWG issues about `export template` (PR #94876)

2024-06-20 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/94876 >From e4028ec6e70f6d86325393a8d03e407404643bc0 Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Sun, 9 Jun 2024 00:59:09 +0300 Subject: [PATCH 1/3] [clang] Cover CWG issues about `export template` --- cl

[clang] [clang] Implement CWG2877 "Type-only lookup for using-enum-declarator" (PR #95399)

2024-06-20 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/95399 >From a7b6a8b667d48d8e70f3e5fcbaaa44a72ad885db Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Thu, 13 Jun 2024 14:35:08 +0300 Subject: [PATCH 1/5] [clang] Implement CWG2877 "Type-only lookup for using-e

[clang] [clang] Add test for CWG2811 "Clarify "use" of main" (PR #96168)

2024-06-20 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/96168 >From 7ac89c2758965fec2dd007954735e59d793d6a59 Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Thu, 20 Jun 2024 14:07:37 +0300 Subject: [PATCH 1/2] [clang] Add test for CWG2811 "Clarify "use" of main" --

[clang] [clang] Add test for CWG2811 "Clarify "use" of main" (PR #96168)

2024-06-20 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/96168 >From 7ac89c2758965fec2dd007954735e59d793d6a59 Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Thu, 20 Jun 2024 14:07:37 +0300 Subject: [PATCH 1/3] [clang] Add test for CWG2811 "Clarify "use" of main" --

[clang] [clang] Change style of superseded issues on C++ DR status page (PR #96051)

2024-06-20 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: That clearly is an unrelated failure. https://github.com/llvm/llvm-project/pull/96051 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Add test for CWG2811 "Clarify "use" of main" (PR #96168)

2024-06-20 Thread Vlad Serebrennikov via cfe-commits
@@ -964,7 +964,7 @@ def err_main_global_variable : def warn_main_redefined : Warning<"variable named 'main' with external linkage " "has undefined behavior">, InGroup; def ext_main_used : Extension< - "ISO C++ does not allow 'main' to be used by a program">, InGroup; + "

[clang] [clang] Add test for CWG2811 "Clarify "use" of main" (PR #96168)

2024-06-20 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: > do we have test that this is fine? > > ``` > namespace foo { > int main(); > using a = decltype(&main); > }``` > ``` Thank you, I added the tests. https://github.com/llvm/llvm-project/pull/96168 ___ cfe-commits mailing list c

[clang] [clang] Add test for CWG2811 "Clarify "use" of main" (PR #96168)

2024-06-20 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/96168 >From 7ac89c2758965fec2dd007954735e59d793d6a59 Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Thu, 20 Jun 2024 14:07:37 +0300 Subject: [PATCH 1/4] [clang] Add test for CWG2811 "Clarify "use" of main" --

[clang] [clang] Implement CWG2877 "Type-only lookup for using-enum-declarator" (PR #95399)

2024-06-20 Thread Vlad Serebrennikov via cfe-commits
@@ -148,13 +148,10 @@ template struct C { enum class D { d, e, f }; - using enum D; - - static constexpr int W = int(f) + I; + using enum D; // expected-error {{using-enum cannot name a dependent type}} Endilll wrote: Ye

[clang] [clang] Implement CWG2877 "Type-only lookup for using-enum-declarator" (PR #95399)

2024-06-20 Thread Vlad Serebrennikov via cfe-commits
@@ -241,6 +238,13 @@ TPLa a; } // namespace Thirteen +namespace Fourteen { +template +int A = T(); + +using enum A; // expected-error {{A is not an enumerated type}} +} // namespace Fourteen Endilll wrote: Yes. If you look at the rest of the file, you'll see

[clang] [clang] Cover CWG issues about `export template` (PR #94876)

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

[clang] [clang] Implement CWG2877 "Type-only lookup for using-enum-declarator" (PR #95399)

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

[clang] [clang] Add test for CWG2811 "Clarify "use" of main" (PR #96168)

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

[clang] [clang] Be const-correct with all uses of `Module *`. (PR #93493)

2024-05-27 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: Can you make sure that at every place this PR touches `const` makes sense? I found out recently that we can be quite good at pretending that something is `const`, all the way down until we realize we need a `const_cast`, because modification is required in that one place. https

[clang] [clang] Be const-correct with all uses of `Module *`. (PR #93493)

2024-05-27 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: Sounds like you have a plan after this PR, which is good. I was worried that you're just applying `const` where it doesn't cause issues _today_. Such approach to const-correctness has been failing us (it leads to `const_cast`s down the usage chain). https://github.com/llvm/llvm

[clang] [llvm] [clang][ci] Move libc++ testing into the main PR pipeline (PR #93318)

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

[clang] [llvm] [clang][ci] Move libc++ testing into the main PR pipeline (PR #93318)

2024-05-27 Thread Vlad Serebrennikov via cfe-commits
@@ -1,82 +0,0 @@ -#===--===## Endilll wrote: I decided to keep it intact out of caution, and asked on Discord instead whether this file is still needed. https://github.com/llvm/llvm-project/pul

[clang] 42b4be6 - [clang][NFC] Remove `utils/ci/run-buildbot` script

2024-05-28 Thread Vlad Serebrennikov via cfe-commits
Author: Vlad Serebrennikov Date: 2024-05-28T13:45:22+03:00 New Revision: 42b4be6d7b896fcf2ef16818862a5be3e98ca791 URL: https://github.com/llvm/llvm-project/commit/42b4be6d7b896fcf2ef16818862a5be3e98ca791 DIFF: https://github.com/llvm/llvm-project/commit/42b4be6d7b896fcf2ef16818862a5be3e98ca791.

[clang] [llvm] [clang][ci] Move libc++ testing into the main PR pipeline (PR #93318)

2024-05-28 Thread Vlad Serebrennikov via cfe-commits
@@ -1,82 +0,0 @@ -#===--===## Endilll wrote: Committed as 681fc40d68936f145963207236d62886e5a34e5d https://github.com/llvm/llvm-project/pull/93318 ___

[clang] [llvm] [clang][ci] Move libc++ testing into the main PR pipeline (PR #93318)

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

[clang] [clang/www/get_started.html] Use newer `cmake` syntax (PR #93503)

2024-05-28 Thread Vlad Serebrennikov via cfe-commits
@@ -67,15 +67,13 @@ On Unix-like Systems Build LLVM and Clang: cd llvm-project -mkdir build (in-tree build is not supported) -cd build This builds both LLVM and Clang in release mode. Alternatively, if you need a debug build, switch Release to Deb

[clang] [llvm] [clang] Introduce target-specific `Sema` components (PR #93179)

2024-05-28 Thread Vlad Serebrennikov via cfe-commits
@@ -3548,6 +3561,56 @@ class Sema final : public SemaBase { BuiltinFunction }; + /// A helper function to provide Attribute Location for the Attr types + /// AND the ParsedAttr. + template + static std::enable_if_t, SourceLocation> + getAttrLoc(const AttrInfo &AL)

[clang] [clang] Be const-correct with all uses of `Module *`. (PR #93493)

2024-05-28 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: I think I should post here an example from our codebase that made me think twice about this PR. First, there's a `MultiLevelTemplateArgumentList` (MLTAL for short), which I believe is one of the backbones of our template engine: https://github.com/llvm/llvm-project/blob/42b4be6

[clang] [clang] Be const-correct with all uses of `Module *`. (PR #93493)

2024-05-28 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: > > `const_cast` here is a relatively recent addition, and I checked out with > > @erichkeane that the use case (pack expansion) is legit. According to the > > approach you're suggesting, the one who wrote this `const_cast` should > > instead refactor the MLTAL to use `llvm::Mut

[clang] [llvm] [clang] Introduce target-specific `Sema` components (PR #93179)

2024-05-28 Thread Vlad Serebrennikov via cfe-commits
@@ -3548,6 +3561,56 @@ class Sema final : public SemaBase { BuiltinFunction }; + /// A helper function to provide Attribute Location for the Attr types + /// AND the ParsedAttr. + template + static std::enable_if_t, SourceLocation> + getAttrLoc(const AttrInfo &AL)

[clang] [clang/www/get_started.html] Use newer `cmake` syntax (PR #93503)

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

[clang] [clang/www/get_started.html] Use newer `cmake` syntax (PR #93503)

2024-05-29 Thread Vlad Serebrennikov via cfe-commits
@@ -67,15 +67,13 @@ On Unix-like Systems Build LLVM and Clang: cd llvm-project -mkdir build (in-tree build is not supported) -cd build This builds both LLVM and Clang in release mode. Alternatively, if you need a debug build, switch Release to Deb

[clang] [clang/www/get_started.html] Use newer `cmake` syntax (PR #93503)

2024-05-29 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll requested changes to this pull request. I'm fine with `cmake --build`, but I don't think that replacing `cd` with `-S` and `-B` is an improvement. https://github.com/llvm/llvm-project/pull/93503 ___ cfe-commits mailing list

[clang] [llvm] [clang] Introduce target-specific `Sema` components (PR #93179)

2024-05-29 Thread Vlad Serebrennikov via cfe-commits
@@ -0,0 +1,36 @@ +//===- Attr.h --- Helper functions for attribute handling in Sema -===// +// +// 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] Add another test case for CWG78 (PR #93708)

2024-05-29 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll created https://github.com/llvm/llvm-project/pull/93708 This issue is concerned with initialization of static objects that are not of non-POD class types. It affirms that default initialization of such objects that typically leaves them with an indeterminate value do

[clang] [clang] Add another test case for CWG78 (PR #93708)

2024-05-29 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/93708 >From 210d58b7133aeb007d423464bcd40d016fc25863 Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Wed, 29 May 2024 15:57:30 +0300 Subject: [PATCH] [clang] Add another test case for CWG78 --- clang/test/CXX

[clang] [clang] CWG150: add tests and change to unreleased (PR #93758)

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

[clang] [clang] CWG150: add tests and change to unreleased (PR #93758)

2024-05-29 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll requested changes to this pull request. You should apply the suggested change, and run `make_cxx_dr_status` script. I don't expect it to introduce new changes, though, but we should be on a safe side here, and not rely on manual editing of `cxx_dr_status.html`. https

[clang] [clang] CWG150: add tests and change to unreleased (PR #93758)

2024-05-29 Thread Vlad Serebrennikov via cfe-commits
@@ -753,6 +753,46 @@ namespace cwg148 { // cwg148: yes // cwg149: na +namespace cwg150 { // cwg150: yes Endilll wrote: ```suggestion namespace cwg150 { // cwg150: 19 ``` https://github.com/llvm/llvm-project/pull/93758 ___

[clang] [clang] CWG150: add tests and change to unreleased (PR #93758)

2024-05-30 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll commented: This looks good to me now. The contents of the test go over my head, though. https://github.com/llvm/llvm-project/pull/93758 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/ma

[clang] [lldb] [llvm] Remove some `try_compile` CMake checks for compiler flags (PR #92953)

2024-05-30 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: I think the issue is that we no longer passed `-fno-lifetime-dse` to GCC due to incorrect condition (my fault), which caused some downstream LTO crashes as reported by @mveriksson in https://github.com/llvm/llvm-project/commit/4feae05c6abda364a9295aecfa600d7d4e7dfeb6#r142466703

[clang] [clang] [SemaCXX] Implement CWG2627 Bit-fields and narrowing conversions (PR #78112)

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

[clang] [clang] [SemaCXX] Implement CWG2627 Bit-fields and narrowing conversions (PR #78112)

2024-05-30 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll commented: Thank you for working on this! https://github.com/llvm/llvm-project/pull/78112 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] [SemaCXX] Implement CWG2627 Bit-fields and narrowing conversions (PR #78112)

2024-05-30 Thread Vlad Serebrennikov via cfe-commits
@@ -24,6 +44,103 @@ using enum E; #endif } +namespace cwg2627 { // cwg2627: 19 +#if __cplusplus >= 202002L +struct C { + long long i : 8; + friend auto operator<=>(C, C) = default; +}; + +void f() { + C x{1}, y{2}; + static_cast(x <=> y); + static_cast(x.i <=> y.i); +} +

[clang] [clang] [SemaCXX] Implement CWG2627 Bit-fields and narrowing conversions (PR #78112)

2024-05-30 Thread Vlad Serebrennikov via cfe-commits
@@ -24,6 +44,103 @@ using enum E; #endif } +namespace cwg2627 { // cwg2627: 19 +#if __cplusplus >= 202002L +struct C { + long long i : 8; + friend auto operator<=>(C, C) = default; +}; + +void f() { + C x{1}, y{2}; + static_cast(x <=> y); + static_cast(x.i <=> y.i); +} +

[clang] [clang] [SemaCXX] Implement CWG2627 Bit-fields and narrowing conversions (PR #78112)

2024-05-30 Thread Vlad Serebrennikov via cfe-commits
@@ -24,6 +44,103 @@ using enum E; #endif } +namespace cwg2627 { // cwg2627: 19 +#if __cplusplus >= 202002L +struct C { + long long i : 8; + friend auto operator<=>(C, C) = default; +}; + +void f() { + C x{1}, y{2}; + static_cast(x <=> y); + static_cast(x.i <=> y.i); +} +

[clang] [clang] [SemaCXX] Implement CWG2627 Bit-fields and narrowing conversions (PR #78112)

2024-05-30 Thread Vlad Serebrennikov via cfe-commits
@@ -24,6 +44,103 @@ using enum E; #endif } +namespace cwg2627 { // cwg2627: 19 +#if __cplusplus >= 202002L +struct C { + long long i : 8; + friend auto operator<=>(C, C) = default; +}; + +void f() { + C x{1}, y{2}; + static_cast(x <=> y); + static_cast(x.i <=> y.i); +} +

[clang] [clang] [SemaCXX] Implement CWG2627 Bit-fields and narrowing conversions (PR #78112)

2024-05-30 Thread Vlad Serebrennikov via cfe-commits
@@ -24,6 +44,103 @@ using enum E; #endif } +namespace cwg2627 { // cwg2627: 19 +#if __cplusplus >= 202002L +struct C { + long long i : 8; + friend auto operator<=>(C, C) = default; +}; + +void f() { + C x{1}, y{2}; + static_cast(x <=> y); + static_cast(x.i <=> y.i); +} +

[clang] [clang] [SemaCXX] Implement CWG2627 Bit-fields and narrowing conversions (PR #78112)

2024-05-30 Thread Vlad Serebrennikov via cfe-commits
@@ -24,6 +44,103 @@ using enum E; #endif } +namespace cwg2627 { // cwg2627: 19 +#if __cplusplus >= 202002L +struct C { + long long i : 8; + friend auto operator<=>(C, C) = default; +}; + +void f() { + C x{1}, y{2}; + static_cast(x <=> y); + static_cast(x.i <=> y.i); +} +

[clang] [llvm] [clang] Introduce target-specific `Sema` components (PR #93179)

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

[clang] [clang/www/get_started.html] Use newer `cmake` syntax (PR #93503)

2024-05-30 Thread Vlad Serebrennikov via cfe-commits
@@ -67,15 +67,13 @@ On Unix-like Systems Build LLVM and Clang: cd llvm-project -mkdir build (in-tree build is not supported) -cd build This builds both LLVM and Clang in release mode. Alternatively, if you need a debug build, switch Release to Deb

[clang] [clang] [SemaCXX] Implement CWG2627 Bit-fields and narrowing conversions (PR #78112)

2024-05-30 Thread Vlad Serebrennikov via cfe-commits
@@ -24,6 +44,103 @@ using enum E; #endif } +namespace cwg2627 { // cwg2627: 19 +#if __cplusplus >= 202002L +struct C { + long long i : 8; + friend auto operator<=>(C, C) = default; +}; + +void f() { + C x{1}, y{2}; + static_cast(x <=> y); + static_cast(x.i <=> y.i); +} +

[clang] [clang] [SemaCXX] Implement CWG2627 Bit-fields and narrowing conversions (PR #78112)

2024-05-30 Thread Vlad Serebrennikov via cfe-commits
@@ -24,6 +44,103 @@ using enum E; #endif } +namespace cwg2627 { // cwg2627: 19 +#if __cplusplus >= 202002L +struct C { + long long i : 8; + friend auto operator<=>(C, C) = default; +}; + +void f() { + C x{1}, y{2}; + static_cast(x <=> y); + static_cast(x.i <=> y.i); +} +

[clang] [clang][NFC] Move `PDiag` into `SemaBase` (PR #93849)

2024-05-30 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll created https://github.com/llvm/llvm-project/pull/93849 This patch moves `PDiag` into `SemaBase`, make it readily available everywhere across `Sema` without `SemaRef`, like the regular `Diag`. >From e2f08e845aa4c2d1af0247c3e03783522b49cf12 Mon Sep 17 00:00:00 2001 Fr

[clang] [clang][NFC] Move `PDiag` into `SemaBase` (PR #93849)

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

[clang] [clang] [SemaCXX] Implement CWG2627 Bit-fields and narrowing conversions (PR #78112)

2024-05-30 Thread Vlad Serebrennikov via cfe-commits
@@ -24,6 +44,103 @@ using enum E; #endif } +namespace cwg2627 { // cwg2627: 19 +#if __cplusplus >= 202002L +struct C { + long long i : 8; + friend auto operator<=>(C, C) = default; +}; + +void f() { + C x{1}, y{2}; + static_cast(x <=> y); + static_cast(x.i <=> y.i); +} +

[clang] [clang] [SemaCXX] Implement CWG2627 Bit-fields and narrowing conversions (PR #78112)

2024-05-30 Thread Vlad Serebrennikov via cfe-commits
@@ -24,6 +44,103 @@ using enum E; #endif } +namespace cwg2627 { // cwg2627: 19 +#if __cplusplus >= 202002L +struct C { + long long i : 8; + friend auto operator<=>(C, C) = default; +}; + +void f() { + C x{1}, y{2}; + static_cast(x <=> y); + static_cast(x.i <=> y.i); +} +

[clang] [clang] [SemaCXX] Implement CWG2627 Bit-fields and narrowing conversions (PR #78112)

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

[clang] [clang][OpenMP] Simplify check for repeated clauses (PR #93611)

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

[clang] [Clang] CWG2749: relational operators involving pointers to void (PR #93046)

2024-05-30 Thread Vlad Serebrennikov via cfe-commits
@@ -18,6 +30,38 @@ void f(B b) { struct D : B {}; } // namespace cwg2718 +namespace cwg2749 { // cwg2749: 19 + +extern int x[2]; +struct Y { + int i; + int j; +}; +extern Y y[2]; + +#if __cplusplus >= 201103L +static_assert(static_cast(x + 0) < static_cast(x + 1), ""); +stat

[clang] [Clang] CWG2749: relational operators involving pointers to void (PR #93046)

2024-05-30 Thread Vlad Serebrennikov via cfe-commits
@@ -18,6 +30,38 @@ void f(B b) { struct D : B {}; } // namespace cwg2718 +namespace cwg2749 { // cwg2749: 19 + +extern int x[2]; +struct Y { + int i; + int j; +}; +extern Y y[2]; + +#if __cplusplus >= 201103L Endilll wrote: If you need to match diagnostics

[clang] [Clang] CWG2749: relational operators involving pointers to void (PR #93046)

2024-05-30 Thread Vlad Serebrennikov via cfe-commits
@@ -1,11 +1,23 @@ -// RUN: %clang_cc1 -triple x86_64-linux-gnu -std=c++98 -verify=expected %s +// RUN: %clang_cc1 -triple x86_64-linux-gnu -std=c++98 -Wgnu-folding-constant -verify=expected %s Endilll wrote: I hope `-Wgnu-folding-constant` is not going to be nee

[clang] [Clang] CWG2749: relational operators involving pointers to void (PR #93046)

2024-05-30 Thread Vlad Serebrennikov via cfe-commits
@@ -18,6 +30,38 @@ void f(B b) { struct D : B {}; } // namespace cwg2718 +namespace cwg2749 { // cwg2749: 19 + +extern int x[2]; +struct Y { + int i; + int j; +}; +extern Y y[2]; + +#if __cplusplus >= 201103L +static_assert(static_cast(x + 0) < static_cast(x + 1), ""); +stat

[clang] [clang] [SemaCXX] Implement CWG2627 Bit-fields and narrowing conversions (PR #78112)

2024-05-30 Thread Vlad Serebrennikov via cfe-commits
@@ -1,11 +1,32 @@ -// RUN: %clang_cc1 -std=c++98 -triple x86_64-unknown-unknown %s -verify=expected -// RUN: %clang_cc1 -std=c++11 -triple x86_64-unknown-unknown %s -verify=expected,since-cxx11,cxx11 -// RUN: %clang_cc1 -std=c++14 -triple x86_64-unknown-unknown %s -verify=expec

[clang] [Clang] CWG2749: relational operators involving pointers to void (PR #93046)

2024-05-30 Thread Vlad Serebrennikov via cfe-commits
@@ -18,6 +30,38 @@ void f(B b) { struct D : B {}; } // namespace cwg2718 +namespace cwg2749 { // cwg2749: 19 + +extern int x[2]; +struct Y { + int i; + int j; +}; +extern Y y[2]; + +#if __cplusplus >= 201103L +static_assert(static_cast(x + 0) < static_cast(x + 1), ""); +stat

[clang] [clang/www/get_started.html] Use newer `cmake` syntax (PR #93503)

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

[clang] [clang/www/get_started.html] Use newer `cmake` syntax (PR #93503)

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

[clang] [clang/www/get_started.html] Use newer `cmake` syntax (PR #93503)

2024-05-30 Thread Vlad Serebrennikov via cfe-commits
@@ -74,8 +74,8 @@ On Unix-like Systems https://llvm.org/docs/CMake.html#frequently-used-cmake-variables";>frequently used cmake variables for more options. -cmake -DLLVM_ENABLE_PROJECTS=clang -DCMAKE_BUILD_TYPE=Release -G "Unix Makefiles" ../llvm

[clang] [Clang][Sema] Diagnose variable template explicit specializations with storage-class-specifiers (PR #93873)

2024-05-30 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll commented: DR test changes look good. https://github.com/llvm/llvm-project/pull/93873 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang] Introduce target-specific `Sema` components (PR #93179)

2024-05-30 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: Thank you for letting me know! Given the amount of positive feedback I've heard about this effort, I think we'll continue, trying to claw back the compile times elsewhere (my recent patch that removed try_compile checks from CMake should've helped, even if it's not counted in yo

[clang] [clang] [SemaCXX] Implement CWG2627 Bit-fields and narrowing conversions (PR #78112)

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

[clang] [clang] [SemaCXX] Implement CWG2627 Bit-fields and narrowing conversions (PR #78112)

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

[clang] [llvm] [clang] Introduce target-specific `Sema` components (PR #93179)

2024-05-30 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: > Mildly curious that there isn't a SemaX86? > > Doh, there already is one. Don't mind me. This PR was based on the success with X86 and RISCV. https://github.com/llvm/llvm-project/pull/93179 ___ cfe-commits mailing list cfe-commits@li

[clang] [llvm] [clang] Introduce target-specific `Sema` components (PR #93179)

2024-05-30 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: I wonder if compile-time regressions come from new translation units I add, because they definitely include stuff. https://github.com/llvm/llvm-project/pull/93179 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llv

[clang] [clang] Split up `SemaDeclAttr.cpp` (PR #93966)

2024-05-31 Thread Vlad Serebrennikov via cfe-commits
@@ -32,6 +32,7 @@ #include "clang/Basic/Specifiers.h" #include "clang/Sema/DeclSpec.h" #include "clang/Sema/Ownership.h" +#include "clang/Sema/ParsedAttr.h" Endilll wrote: Yeah, I totally forgot about forward decls while preparing this PR. I fixed that for th

[clang] [clang] Split up `SemaDeclAttr.cpp` (PR #93966)

2024-05-31 Thread Vlad Serebrennikov via cfe-commits
@@ -0,0 +1,57 @@ +//===- SemaSwift.h --- Swift language-specific routines ---*- C++ -*---===// +// +// 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] Split up `SemaDeclAttr.cpp` (PR #93966)

2024-05-31 Thread Vlad Serebrennikov via cfe-commits
@@ -3825,6 +3843,115 @@ class Sema final : public SemaBase { void redelayDiagnostics(sema::DelayedDiagnosticPool &pool); + /// Diagnose mutually exclusive attributes when present on a given Endilll wrote: Making functions accept reference to `SemaBase` is

[clang] [clang] Split up `SemaDeclAttr.cpp` (PR #93966)

2024-05-31 Thread Vlad Serebrennikov via cfe-commits
@@ -14,9 +14,11 @@ #define LLVM_CLANG_SEMA_SEMASYCL_H #include "clang/AST/Decl.h" +#include "clang/AST/DeclBase.h" Endilll wrote: This one should be fixed as well now. https://github.com/llvm/llvm-project/pull/93966 __

[clang] [clang] Split up `SemaDeclAttr.cpp` (PR #93966)

2024-05-31 Thread Vlad Serebrennikov via cfe-commits
@@ -32,5 +36,87 @@ inline bool isFunctionOrMethodOrBlockForAttrSubject(const Decl *D) { return isFuncOrMethodForAttrSubject(D) || llvm::isa(D); } +/// Return true if the given decl has a declarator that should have +/// been processed by Sema::GetTypeForDeclarator. +inline

[clang] [clang] Split up `SemaDeclAttr.cpp` (PR #93966)

2024-05-31 Thread Vlad Serebrennikov via cfe-commits
@@ -32,5 +36,87 @@ inline bool isFunctionOrMethodOrBlockForAttrSubject(const Decl *D) { return isFuncOrMethodForAttrSubject(D) || llvm::isa(D); } +/// Return true if the given decl has a declarator that should have +/// been processed by Sema::GetTypeForDeclarator. +inline

<    7   8   9   10   11   12   13   14   15   16   >