[clang-tools-extra] e6b14b6 - [clangd] Fix directory separators in `infinite-instantiation.test`

2024-05-21 Thread Vlad Serebrennikov via cfe-commits
Author: Vlad Serebrennikov Date: 2024-05-21T21:01:21+03:00 New Revision: e6b14b6f8bfeeea8d24c8dccb17053ba491d5879 URL: https://github.com/llvm/llvm-project/commit/e6b14b6f8bfeeea8d24c8dccb17053ba491d5879 DIFF:

[clang] [Clang] Change how the argument of a delete expression is converted (PR #92814)

2024-05-21 Thread Vlad Serebrennikov via cfe-commits
@@ -1230,11 +1230,11 @@ namespace cwg598 { // cwg598: yes int = h(N::i); } -namespace cwg599 { // cwg599: partial +namespace cwg599 { // cwg599: 19 typedef int Fn(); struct S { operator void*(); }; struct T { operator Fn*(); }; - struct U { operator int*();

[clang] [Clang] Change how the argument of a delete expression is converted (PR #92814)

2024-05-21 Thread Vlad Serebrennikov via cfe-commits
@@ -1245,12 +1245,7 @@ namespace cwg599 { // cwg599: partial // expected-error@-1 {{cannot delete expression with pointer-to-'void' type 'void *'}} delete t; // expected-error@-1 {{cannot delete expression of type 'T'}} -// FIXME: This is valid, but is

[clang] [Clang] Change how the argument of a delete expression is converted (PR #92814)

2024-05-21 Thread Vlad Serebrennikov via cfe-commits
@@ -1230,11 +1230,11 @@ namespace cwg598 { // cwg598: yes int = h(N::i); } -namespace cwg599 { // cwg599: partial +namespace cwg599 { // cwg599: 19 typedef int Fn(); struct S { operator void*(); }; struct T { operator Fn*(); }; - struct U { operator int*();

[clang-tools-extra] 7c640d1 - [clangd] Fix directory separators in `infinite-instatiation.test`

2024-05-21 Thread Vlad Serebrennikov via cfe-commits
Author: Vlad Serebrennikov Date: 2024-05-21T17:12:35+03:00 New Revision: 7c640d1d43d7a151100e92c678757e0ce897bcc2 URL: https://github.com/llvm/llvm-project/commit/7c640d1d43d7a151100e92c678757e0ce897bcc2 DIFF:

[clang-tools-extra] 2117136 - [clangd] Fix bad directory path in `infinite-instantiations.test`

2024-05-21 Thread Vlad Serebrennikov via cfe-commits
Author: Vlad Serebrennikov Date: 2024-05-21T15:42:31+03:00 New Revision: 2117136b2b78ef3b83202909ffaf351598da8bd5 URL: https://github.com/llvm/llvm-project/commit/2117136b2b78ef3b83202909ffaf351598da8bd5 DIFF:

[clang] [clang] Introduce `SemaPseudoObject` (PR #92646)

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

[clang-tools-extra] [clangd] Reduce instantiation depth in `infinite-instantiations.test` (PR #92888)

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

[clang-tools-extra] [clangd] Reduce instantiation depth in `infinite-instantiations.test` (PR #92888)

2024-05-21 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: Linux CI passed, so I'm merging this. https://github.com/llvm/llvm-project/pull/92888 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clangd] Reduce instantiation depth in `infinite-instantiations.test` (PR #92888)

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

[clang-tools-extra] [clangd] Reduce instantiation depth in `infinite-instantiations.test` (PR #92888)

2024-05-21 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll created https://github.com/llvm/llvm-project/pull/92888 This patch reduces template instantiation depth in `infinite-instantiations.test`, because it doesn't seem to be concerned with the default instantiation depth in particular, but has a very material impact on

[clang] [clang] Introduce `SemaRISCV` (PR #92682)

2024-05-21 Thread Vlad Serebrennikov via cfe-commits
@@ -0,0 +1,52 @@ +//===- SemaRISCV.h --- RISC-V target-specific routines ===// Endilll wrote: Fixed https://github.com/llvm/llvm-project/pull/92682 ___ cfe-commits mailing list

[clang] [llvm] [Clang] Fix definition of layout-compatible to ignore empty classes (PR #92103)

2024-05-21 Thread Vlad Serebrennikov via cfe-commits
@@ -561,6 +561,42 @@ void CXXRecordDecl::addedClassSubobject(CXXRecordDecl *Subobj) { data().StructuralIfLiteral = false; } +const CXXRecordDecl *CXXRecordDecl::getStandardLayoutBaseWithFields() const { +#ifndef NDEBUG + { +assert( +isStandardLayout() && +

[clang] [llvm] [Clang] Fix definition of layout-compatible to ignore empty classes (PR #92103)

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

[clang] [llvm] [Clang] Fix definition of layout-compatible to ignore empty classes (PR #92103)

2024-05-21 Thread Vlad Serebrennikov via cfe-commits
@@ -561,6 +561,42 @@ void CXXRecordDecl::addedClassSubobject(CXXRecordDecl *Subobj) { data().StructuralIfLiteral = false; } +const CXXRecordDecl *CXXRecordDecl::getStandardLayoutBaseWithFields() const { +#ifndef NDEBUG Endilll wrote: We have

[clang] [llvm] [Clang] Fix definition of layout-compatible to ignore empty classes (PR #92103)

2024-05-21 Thread Vlad Serebrennikov via cfe-commits
@@ -561,6 +561,42 @@ void CXXRecordDecl::addedClassSubobject(CXXRecordDecl *Subobj) { data().StructuralIfLiteral = false; } +const CXXRecordDecl *CXXRecordDecl::getStandardLayoutBaseWithFields() const { +#ifndef NDEBUG + { +assert( +isStandardLayout() && +

[clang] [llvm] [Clang] Fix definition of layout-compatible to ignore empty classes (PR #92103)

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

[clang] [clang][NFC] Refactor `Sema::TagUseKind` (PR #92689)

2024-05-21 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/92689 >From 9c89a7b451221d79f96fd1fc1d015c6a22b9f66e Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Sun, 19 May 2024 15:00:38 +0300 Subject: [PATCH] [clang][NFC] Refactor `Sema::TagUseKind` This patch makes

[clang] [llvm] [BPF] Fix linking issues in static map initializers (PR #91310)

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

[clang] [Clang] Change how the argument of a delete expression is converted (PR #92814)

2024-05-20 Thread Vlad Serebrennikov via cfe-commits
@@ -1245,12 +1245,7 @@ namespace cwg599 { // cwg599: partial // expected-error@-1 {{cannot delete expression with pointer-to-'void' type 'void *'}} delete t; // expected-error@-1 {{cannot delete expression of type 'T'}} -// FIXME: This is valid, but is

[clang] [Clang] Change how the argument of a delete expression is converted (PR #92814)

2024-05-20 Thread Vlad Serebrennikov via cfe-commits
@@ -1230,11 +1230,11 @@ namespace cwg598 { // cwg598: yes int = h(N::i); } -namespace cwg599 { // cwg599: partial +namespace cwg599 { // cwg599: 19 typedef int Fn(); struct S { operator void*(); }; struct T { operator Fn*(); }; - struct U { operator int*();

[clang] [clang] Introduce `SemaRISCV` (PR #92682)

2024-05-20 Thread Vlad Serebrennikov via cfe-commits
@@ -1,12 +1,12 @@ -//==- SemaRISCVVectorLookup.cpp - Name Lookup for RISC-V Vector Intrinsic -==// +//==--- SemaRISCV.cpp --- RISC-V target-specific routines --==// Endilll wrote: I never noticed this. Thanks!

[clang] [clang] Introduce `SemaRISCV` (PR #92682)

2024-05-20 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: > Pushing a prerequisite commit first with git mv SemaRISCVVectorLookup.cpp > SemaRISCV.cpp should make git recognize this as a file rename. This PR can be > changed to rebase on that precommit. Thank you for suggestion! Done. https://github.com/llvm/llvm-project/pull/92682

[clang] d71f30a - [clang][NFC] Update the list of Core issues

2024-05-20 Thread Vlad Serebrennikov via cfe-commits
Author: Vlad Serebrennikov Date: 2024-05-20T20:03:42+03:00 New Revision: d71f30a7f45c5a73fe551ea4ca48b11191e7b0e8 URL: https://github.com/llvm/llvm-project/commit/d71f30a7f45c5a73fe551ea4ca48b11191e7b0e8 DIFF:

[clang] 4f5bc4b - [clang][NFC] Rename `SemaRISCVVectorLookup.cpp` into `SemaRISCV.cpp`

2024-05-20 Thread Vlad Serebrennikov via cfe-commits
Author: Vlad Serebrennikov Date: 2024-05-20T20:02:38+03:00 New Revision: 4f5bc4bb55a8091ca9eb6dd016dcb2be82bf917a URL: https://github.com/llvm/llvm-project/commit/4f5bc4bb55a8091ca9eb6dd016dcb2be82bf917a DIFF:

[clang] [llvm] Disable compiling and testing Flang on Clang changes (PR #92740)

2024-05-20 Thread Vlad Serebrennikov via cfe-commits
@@ -68,7 +68,7 @@ function compute-projects-to-test() { done ;; clang) - for p in clang-tools-extra compiler-rt flang lldb cross-project-tests; do + for p in clang-tools-extra compiler-rt lldb cross-project-tests; do Endilll wrote: >

[clang] [llvm] Disable compiling and testing Flang on Clang changes (PR #92740)

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

[clang] [llvm] Disable compiling Flang and running its tests on Clang changes (PR #92740)

2024-05-20 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: I'd like to merge this after @tstellar or @lnihlen give their approval. https://github.com/llvm/llvm-project/pull/92740 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Disable compiling Flang and running its tests on Clang changes (PR #92740)

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

[clang] [clang] Introduce `SemaAccess` (PR #92674)

2024-05-20 Thread Vlad Serebrennikov via cfe-commits
@@ -1459,11 +1460,11 @@ static AccessResult CheckEffectiveAccess(Sema , llvm_unreachable("invalid access result"); } -static Sema::AccessResult CheckAccess(Sema , SourceLocation Loc, - AccessTarget ) { +static SemaAccess::AccessResult

[clang] [clang] Introduce `SemaAccess` (PR #92674)

2024-05-20 Thread Vlad Serebrennikov via cfe-commits
@@ -0,0 +1,112 @@ +//===- SemaAccess.h - C++ Access Control --===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier:

[clang] [clang][NFC] Refactor `Sema::TagUseKind` (PR #92689)

2024-05-20 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/92689 >From 9c89a7b451221d79f96fd1fc1d015c6a22b9f66e Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Sun, 19 May 2024 15:00:38 +0300 Subject: [PATCH] [clang][NFC] Refactor `Sema::TagUseKind` This patch makes

[clang] [llvm] Disable compiling Flang and running its tests on Clang changes (PR #92740)

2024-05-20 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/92740 >From d306d06f7f5455788016f985b44fdf9672c90b86 Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Mon, 20 May 2024 14:22:20 +0300 Subject: [PATCH 1/3] Disable compiling Flang and running its tests on Clang

[clang] [llvm] Disable compiling Flang and running its tests on Clang changes (PR #92740)

2024-05-20 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/92740 >From d306d06f7f5455788016f985b44fdf9672c90b86 Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Mon, 20 May 2024 14:22:20 +0300 Subject: [PATCH 1/3] Disable compiling Flang and running its tests on Clang

[clang] [llvm] Disable compiling Flang and running its tests on Clang changes (PR #92740)

2024-05-20 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: Windows CI has finished with an unrelated failure. https://buildkite.com/llvm-project/github-pull-requests/builds/65498 confirms that this patch is working as intended, i.e. Flang is not tested on Clang changes on both Linux and Windows.

[clang] [llvm] Disable compiling Flang and running its tests on Clang changes (PR #92740)

2024-05-20 Thread Vlad Serebrennikov via cfe-commits
@@ -68,7 +68,7 @@ function compute-projects-to-test() { done ;; clang) - for p in clang-tools-extra compiler-rt flang lldb cross-project-tests; do + for p in clang-tools-extra compiler-rt lldb cross-project-tests; do Endilll wrote: The

[clang] [llvm] Disable compiling Flang and running its tests on Clang changes (PR #92740)

2024-05-20 Thread Vlad Serebrennikov via cfe-commits
@@ -72,7 +72,7 @@ class PrintFunctionsConsumer : public ASTConsumer { *sema.LateParsedTemplateMap.find(FD)->second; sema.LateTemplateParser(sema.OpaqueParser, LPT); llvm::errs() << "late-parsed-decl: \"" << FD->getNameAsString() << "\"\n"; -} +

[clang] [clang] Introduce `SemaCoroutine` (PR #92645)

2024-05-20 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: > Given the concerns raised here, it might make sense to put this change on > hold, do a few more similar experiments for other parts of C++, and see what > sort of principled design approach makes sense to take here. It's not clear to me what do we want to clarify or try out

[clang] [llvm] Disable compiling Flang and running its tests on Clang changes (PR #92740)

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

[clang] [llvm] Disable compiling Flang and running its tests on Clang changes (PR #92740)

2024-05-20 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: https://buildkite.com/llvm-project/github-pull-requests/builds/65498#018f95c2-a52b-4d95-97ac-ea7e0c7be9ae confirms that Flang is no longer compiler, and Flang tests are no longer executed. https://github.com/llvm/llvm-project/pull/92740

[clang] [llvm] Disable compiling Flang and running its tests on Clang changes (PR #92740)

2024-05-20 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/92740 >From d306d06f7f5455788016f985b44fdf9672c90b86 Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Mon, 20 May 2024 14:22:20 +0300 Subject: [PATCH 1/2] Disable compiling Flang and running its tests on Clang

[clang] [clang] Introduce `SemaCoroutine` (PR #92645)

2024-05-19 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: > While I am not against the idea about splitting Sema, the implementation > detail makes me slightly concerning. What I had in mind is to split SemaC, > SemaCXX (this can be derived class of SemaCXX), SemaObjC and other dialects > (e.g., ACC or CUDA) out of Sema. Inheritance

[clang] [clang] Introduce `SemaRISCV` (PR #92682)

2024-05-19 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: It is, but I guess significant enough to not be disguised by labeling as NFC. https://github.com/llvm/llvm-project/pull/92682 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [clang] Introduce `SemaCoroutine` (PR #92645)

2024-05-19 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: > Was there ever an RFC on this whole 'splitting up Sema' project? It was quite extensively discussed in #84184, but it wasn't deemed necessary to go through RFC process for a non-functional change that doesn't affect stable interfaces. > I think starting up from the easier

[clang] [clang][NFC] Refactor `Sema::TagUseKind` (PR #92689)

2024-05-19 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: I'll merge this when CI passes. https://github.com/llvm/llvm-project/pull/92689 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][NFC] Refactor `Sema::TagUseKind` (PR #92689)

2024-05-19 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll created https://github.com/llvm/llvm-project/pull/92689 This patch makes `TagUseKind` a scoped enumeration, and moves it outside of `Sema` class, making it eligible for forward declaring. >From 9c89a7b451221d79f96fd1fc1d015c6a22b9f66e Mon Sep 17 00:00:00 2001 From:

[clang] [clang] Introduce `SemaCoroutine` (PR #92645)

2024-05-19 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/92645 >From 4fe09a3411e54561857d2f9d8c1808cb2728e299 Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Sat, 18 May 2024 13:33:04 +0300 Subject: [PATCH 1/3] [clang] Introduce `SemaCoroutine` ---

[clang] [clang] Introduce `SemaPseudoObject` (PR #92646)

2024-05-18 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/92646 >From 81b2c7dbb6fb9cb24d560b6069f60ba3452bbf2a Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Sat, 18 May 2024 14:20:43 +0300 Subject: [PATCH 1/2] [clang] Introduce `SemaPseudoObject` ---

[clang] [clang] Introduce `SemaCoroutine` (PR #92645)

2024-05-18 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/92645 >From 4fe09a3411e54561857d2f9d8c1808cb2728e299 Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Sat, 18 May 2024 13:33:04 +0300 Subject: [PATCH 1/3] [clang] Introduce `SemaCoroutine` ---

[clang] [clang] Introduce `SemaCoroutine` (PR #92645)

2024-05-18 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: > What is the goal here? there is a lot of code reuse in C++ and C. and having > a file per feature is going to make thing worse (maintenance, unboarding, > compile times). Maintenance: one big blob of code which is `Sema` makes it virtually impossible to approach

[clang] [clang][AST] Fix end location of DeclarationNameInfo on instantiated methods (PR #92654)

2024-05-18 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll commented: LGTM, but wait for more reviews. https://github.com/llvm/llvm-project/pull/92654 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Introduce `SemaCoroutine` (PR #92645)

2024-05-18 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: As @erichkeane described it, we're clearing the woods of "core" C++ functionality before dealing with the hard parts, like `SemaDeclCXX.cpp` or `SemaChecking.cpp`. Actual LoC wins are secondary, as they have been all along. https://github.com/llvm/llvm-project/pull/92645

[clang] [clang] Introduce `SemaPseudoObject` (PR #92646)

2024-05-18 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll created https://github.com/llvm/llvm-project/pull/92646 This patch moves `Sema` functions that handle pseudo-objects into the new `SemaPseudoObject` class. This continues previous efforts to split `Sema` up. Additional context can be found in #84184. As usual, in

[clang] [clang] Introduce `SemaCoroutine` (PR #92645)

2024-05-18 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/92645 >From 4fe09a3411e54561857d2f9d8c1808cb2728e299 Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Sat, 18 May 2024 13:33:04 +0300 Subject: [PATCH 1/3] [clang] Introduce `SemaCoroutine` ---

[clang] [clang] Introduce `SemaCoroutine` (PR #92645)

2024-05-18 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll created https://github.com/llvm/llvm-project/pull/92645 This patch moves coroutines-specific `Sema` functions into the new `SemaCoroutine` class. This continues previous efforts to split `Sema` up. Additional context can be found in #84184. As usual, in order to

[clang] f7b0b99 - [clang][NFC] Further improvements to const-correctness

2024-05-18 Thread Vlad Serebrennikov via cfe-commits
Author: Vlad Serebrennikov Date: 2024-05-18T12:10:39+03:00 New Revision: f7b0b99c52ee36ed6ca8abcce74a752e483768d6 URL: https://github.com/llvm/llvm-project/commit/f7b0b99c52ee36ed6ca8abcce74a752e483768d6 DIFF:

[clang] df575be - [clang][NFC] Add `const` qualifier in `Sema::isIncompatibleTypedef`

2024-05-17 Thread Vlad Serebrennikov via cfe-commits
Author: Vlad Serebrennikov Date: 2024-05-17T23:10:12+03:00 New Revision: df575be9d864886684e536cd76c5a96bb0d443a6 URL: https://github.com/llvm/llvm-project/commit/df575be9d864886684e536cd76c5a96bb0d443a6 DIFF:

[clang] [Clang][CWG1815] Support lifetime extension of temporary created by aggregate initialization using a default member initializer (PR #87933)

2024-05-17 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: > It might violate https://eel.is/c++draft/temp.inst#11 to attempt to > instantiate the unused S::operator int? I don't think this clause of the standard is violated: you need to instantiate a declaration of the conversion function to at the end of definition of `M`, otherwise

[clang] [clang] Introduce `SemaCodeCompletion` (PR #92311)

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

[clang] 8aa6511 - [clang][NFC] Remove an unnecessary `const_cast`

2024-05-17 Thread Vlad Serebrennikov via cfe-commits
Author: Vlad Serebrennikov Date: 2024-05-17T19:10:34+03:00 New Revision: 8aa6511f4209bba33a74c4ef6e208fda5c0f3d27 URL: https://github.com/llvm/llvm-project/commit/8aa6511f4209bba33a74c4ef6e208fda5c0f3d27 DIFF:

[clang] 84aee95 - [clang][NFC] Remove `const_cast` from `Preprocessor::addModuleMacro()`

2024-05-17 Thread Vlad Serebrennikov via cfe-commits
Author: Vlad Serebrennikov Date: 2024-05-17T18:11:49+03:00 New Revision: 84aee95124549c5d13e22053af254e3fcc02bc84 URL: https://github.com/llvm/llvm-project/commit/84aee95124549c5d13e22053af254e3fcc02bc84 DIFF:

[clang] 30d0850 - [clang][NFC] Improve const-correctness in `ParseLexedMethodDeclaration`

2024-05-17 Thread Vlad Serebrennikov via cfe-commits
Author: Vlad Serebrennikov Date: 2024-05-17T17:15:44+03:00 New Revision: 30d0850e0f780b17a37522e6503c98ebe197c5fa URL: https://github.com/llvm/llvm-project/commit/30d0850e0f780b17a37522e6503c98ebe197c5fa DIFF:

[clang] [clang][NFC] Remove const-qualification from `FunctionTemplateSpecializationInfo::TemplateArguments` (PR #92500)

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

[clang] d3d5a30 - [clang][NFC] Remove `const_cast` from `ParseClassSpecifier`

2024-05-17 Thread Vlad Serebrennikov via cfe-commits
Author: Vlad Serebrennikov Date: 2024-05-17T16:41:20+03:00 New Revision: d3d5a30021b8df26ac4b2b01e659ab8487fb4080 URL: https://github.com/llvm/llvm-project/commit/d3d5a30021b8df26ac4b2b01e659ab8487fb4080 DIFF:

[clang] [clang][Sema] Warn consecutive builtin comparisons in an expression (PR #92200)

2024-05-17 Thread Vlad Serebrennikov via cfe-commits
@@ -85,7 +85,7 @@ void f(int x, int y, int z) { if ((ayyhttps://github.com/llvm/llvm-project/pull/92200 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Implement CWG2428 "Deprecating a concept" (PR #92295)

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

[clang] [clang][NFC] Improve const-correctness in `SourceManager` (PR #92436)

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

[clang] [clang][NFC] Remove const-qualification from `FunctionTemplateSpecializationInfo::TemplateArguments` (PR #92500)

2024-05-17 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll created https://github.com/llvm/llvm-project/pull/92500 This patch remove const-qualification from pointee type of `FunctionTemplateSpecializationInfo::TemplateArguments`, because it's (eventually) used to initialize `MultiLevelTemplateArgumentList`, which can

[clang] [clang] Implement CWG2428 "Deprecating a concept" (PR #92295)

2024-05-16 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/92295 >From a0d5a234431f3db2f0283ffa0909bf8c254aa611 Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Wed, 15 May 2024 20:20:43 +0300 Subject: [PATCH 1/9] [clang] Implement CWG2428 "Deprecating a concept" ---

[clang] [clang] Implement CWG2428 "Deprecating a concept" (PR #92295)

2024-05-16 Thread Vlad Serebrennikov via cfe-commits
@@ -167,9 +167,11 @@ Parser::DeclGroupPtrTy Parser::ParseTemplateDeclarationOrSpecialization( LastParamListWasEmpty); // Parse the actual template declaration. - if (Tok.is(tok::kw_concept)) -return Actions.ConvertDeclToDeclGroup( -

[clang] [clang] Implement CWG2428 "Deprecating a concept" (PR #92295)

2024-05-16 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/92295 >From a0d5a234431f3db2f0283ffa0909bf8c254aa611 Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Wed, 15 May 2024 20:20:43 +0300 Subject: [PATCH 1/8] [clang] Implement CWG2428 "Deprecating a concept" ---

[clang] [clang][NFC] Improve const-correctness in `SourceManager` (PR #92436)

2024-05-16 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll created https://github.com/llvm/llvm-project/pull/92436 This patch adds several const-qualified variants of existing member functions to `SourceManager`. I started with removing const qualification from `setNumCreatedFIDsForFileID`, and removing `const_cast` in the

[clang] d1f96d4 - [clang][NFC] Claim support for P3106R1 since Clang 17

2024-05-16 Thread Vlad Serebrennikov via cfe-commits
Author: Vlad Serebrennikov Date: 2024-05-16T17:53:14+03:00 New Revision: d1f96d4cfe25770827b5f819b6a9de6fef142c9c URL: https://github.com/llvm/llvm-project/commit/d1f96d4cfe25770827b5f819b6a9de6fef142c9c DIFF:

[clang] [clang] Implement CWG2428 "Deprecating a concept" (PR #92295)

2024-05-16 Thread Vlad Serebrennikov via cfe-commits
@@ -45,6 +45,34 @@ void fallthrough(int n) { #endif } +namespace cwg2428 { // cwg2428: 19 +#if __cplusplus >= 202002L +template +concept C [[deprecated]] = true; // #C Endilll wrote: (MSVC spelling was removed.)

[clang] [clang] Implement CWG2428 "Deprecating a concept" (PR #92295)

2024-05-16 Thread Vlad Serebrennikov via cfe-commits
@@ -8092,6 +8092,18 @@ void Sema::checkCall(NamedDecl *FDecl, const FunctionProtoType *Proto, diagnoseArgDependentDiagnoseIfAttrs(FD, ThisArg, Args, Loc); } +void Sema::CheckConstrainedAuto(TypeSourceInfo *TS) { + if (getLangOpts().CPlusPlus20) {

[clang] [clang] Implement CWG2428 "Deprecating a concept" (PR #92295)

2024-05-16 Thread Vlad Serebrennikov via cfe-commits
@@ -8092,6 +8092,18 @@ void Sema::checkCall(NamedDecl *FDecl, const FunctionProtoType *Proto, diagnoseArgDependentDiagnoseIfAttrs(FD, ThisArg, Args, Loc); } +void Sema::CheckConstrainedAuto(TypeSourceInfo *TS) { + if (getLangOpts().CPlusPlus20) { +if (const AutoType

[clang] [clang] Implement CWG2428 "Deprecating a concept" (PR #92295)

2024-05-16 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/92295 >From a0d5a234431f3db2f0283ffa0909bf8c254aa611 Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Wed, 15 May 2024 20:20:43 +0300 Subject: [PATCH 1/7] [clang] Implement CWG2428 "Deprecating a concept" ---

[clang] [clang] Implement CWG2428 "Deprecating a concept" (PR #92295)

2024-05-16 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/92295 >From a0d5a234431f3db2f0283ffa0909bf8c254aa611 Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Wed, 15 May 2024 20:20:43 +0300 Subject: [PATCH 1/6] [clang] Implement CWG2428 "Deprecating a concept" ---

[clang] [clang] Implement CWG2428 "Deprecating a concept" (PR #92295)

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

[clang] [clang] Implement CWG2428 "Deprecating a concept" (PR #92295)

2024-05-16 Thread Vlad Serebrennikov via cfe-commits
@@ -316,7 +318,8 @@ Parser::ParseConceptDefinition(const ParsedTemplateInfo , const IdentifierInfo *Id = Result.Identifier; SourceLocation IdLoc = Result.getBeginLoc(); - DiagnoseAndSkipCXX11Attributes(); + ParsedAttributes Attrs(AttrFactory); +

[clang] [clang] Implement provisional wording for CWG2398 regarding packs (PR #90820)

2024-05-16 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: > Despite CWG2398 not being voted in yet, the status in > > https://github.com/llvm/llvm-project/blob/e3f42b02a4129947ca2dd820bfb63ffed83027b7/clang/www/cxx_dr_status.html#L14195-L14200 > > should be updated. The only way to update it is to add a test to `clang/test/CXX/drs`.

[clang] [clang] Implement CWG2428 "Deprecating a concept" (PR #92295)

2024-05-16 Thread Vlad Serebrennikov via cfe-commits
@@ -45,6 +45,34 @@ void fallthrough(int n) { #endif } +namespace cwg2428 { // cwg2428: 19 +#if __cplusplus >= 202002L +template +concept C [[deprecated]] = true; // #C Endilll wrote: I added support for GNU and MSVC spellings.

[clang] [clang] Implement CWG2428 "Deprecating a concept" (PR #92295)

2024-05-16 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/92295 >From a0d5a234431f3db2f0283ffa0909bf8c254aa611 Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Wed, 15 May 2024 20:20:43 +0300 Subject: [PATCH 1/5] [clang] Implement CWG2428 "Deprecating a concept" ---

[clang] [clang] Implement CWG2428 "Deprecating a concept" (PR #92295)

2024-05-16 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/92295 >From a0d5a234431f3db2f0283ffa0909bf8c254aa611 Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Wed, 15 May 2024 20:20:43 +0300 Subject: [PATCH 1/4] [clang] Implement CWG2428 "Deprecating a concept" ---

[clang] [clang] Implement CWG2428 "Deprecating a concept" (PR #92295)

2024-05-16 Thread Vlad Serebrennikov via cfe-commits
@@ -45,6 +45,34 @@ void fallthrough(int n) { #endif } +namespace cwg2428 { // cwg2428: 19 +#if __cplusplus >= 202002L +template +concept C [[deprecated]] = true; // #C Endilll wrote: Non-standard spellings of this attribute are out of scope of the Core

[clang] [clang] Implement CWG2428 "Deprecating a concept" (PR #92295)

2024-05-16 Thread Vlad Serebrennikov via cfe-commits
@@ -45,6 +45,38 @@ void fallthrough(int n) { #endif } +namespace cwg2428 { // cwg2428: 19 +#if __cplusplus >= 202002L +template +concept C [[deprecated]] = true; // #cwg2428-C + +template +[[deprecated]] concept C2 = true; +// expected-error@-1 {{expected unqualified-id}} +

[clang] [clang] Implement CWG2428 "Deprecating a concept" (PR #92295)

2024-05-16 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/92295 >From a0d5a234431f3db2f0283ffa0909bf8c254aa611 Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Wed, 15 May 2024 20:20:43 +0300 Subject: [PATCH 1/3] [clang] Implement CWG2428 "Deprecating a concept" ---

[clang] [Clang][Sema] Don't build CXXDependentScopeMemberExprs for potentially implicit class member access expressions (PR #92318)

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

[clang] [clang] Implement CWG2428 "Deprecating a concept" (PR #92295)

2024-05-15 Thread Vlad Serebrennikov via cfe-commits
@@ -45,6 +45,34 @@ void fallthrough(int n) { #endif } +namespace cwg2428 { // cwg2428: 19 +#if __cplusplus >= 202002L +template +concept C [[deprecated]] = true; // #C Endilll wrote: I added test with alternative attribute placing. > It would also be good

[clang] [clang] Implement CWG2428 "Deprecating a concept" (PR #92295)

2024-05-15 Thread Vlad Serebrennikov via cfe-commits
@@ -10698,7 +10698,7 @@ C++ defect report implementation status https://cplusplus.github.io/CWG/issues/1815.html;>1815 CD4 Lifetime extension in aggregate initialization -Clang 19 +Yes Endilll wrote: I updated the branch from `main`, now

[clang] [clang] Implement CWG2428 "Deprecating a concept" (PR #92295)

2024-05-15 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/92295 >From a0d5a234431f3db2f0283ffa0909bf8c254aa611 Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Wed, 15 May 2024 20:20:43 +0300 Subject: [PATCH 1/2] [clang] Implement CWG2428 "Deprecating a concept" ---

[clang] [clang] Add tests for CWG issues regarding completeness of types (PR #92113)

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

[clang] [clang] Implement CWG2428 "Deprecating a concept" (PR #92295)

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

[clang] [clang] Implement CWG2428 "Deprecating a concept" (PR #92295)

2024-05-15 Thread Vlad Serebrennikov via cfe-commits
@@ -10698,7 +10698,7 @@ C++ defect report implementation status https://cplusplus.github.io/CWG/issues/1815.html;>1815 CD4 Lifetime extension in aggregate initialization -Clang 19 +Yes Endilll wrote: This particular one is an unfortunate

[clang] [clang] Implement CWG2428 "Deprecating a concept" (PR #92295)

2024-05-15 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll created https://github.com/llvm/llvm-project/pull/92295 This patch allows attributes to be attached to C++20 concepts, implementing [CWG2428](https://cplusplus.github.io/CWG/issues/2428.html). >From a0d5a234431f3db2f0283ffa0909bf8c254aa611 Mon Sep 17 00:00:00 2001

[clang] [clang] Fix CXXNewExpr end source location for 'new struct S' (PR #92266)

2024-05-15 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: `clang-tidy/checkers/modernize/make-unique.cpp` is failing for whatever reason. Otherwise LGTM. https://github.com/llvm/llvm-project/pull/92266 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [clang] Add tests for CWG issues regarding completeness of types (PR #92113)

2024-05-15 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/92113 >From 1ae4b4e9c6b76269b7e279f798057900b5d39a0c Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Tue, 14 May 2024 15:45:30 +0300 Subject: [PATCH 1/6] [clang] Add tests for CWG issues regarding completeness

[clang] [clang] Add tests for CWG issues regarding completeness of types (PR #92113)

2024-05-14 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/92113 >From 1ae4b4e9c6b76269b7e279f798057900b5d39a0c Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Tue, 14 May 2024 15:45:30 +0300 Subject: [PATCH 1/5] [clang] Add tests for CWG issues regarding completeness

[clang] [clang] Add tests for CWG issues regarding completeness of types (PR #92113)

2024-05-14 Thread Vlad Serebrennikov via cfe-commits
@@ -67,6 +63,27 @@ void B::g() requires true; } // namespace cwg2847 +namespace cwg2857 { // cwg2857: 2.7 +struct A {}; +struct B { + int operator+(A); +}; +template +struct D; + +void f(A* a, D* d) { + *d + *a; Endilll wrote: Thank you! I used one of

[clang] [clang] Add tests for CWG issues regarding completeness of types (PR #92113)

2024-05-14 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/92113 >From 1ae4b4e9c6b76269b7e279f798057900b5d39a0c Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Tue, 14 May 2024 15:45:30 +0300 Subject: [PATCH 1/4] [clang] Add tests for CWG issues regarding completeness

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