[clang] [clang] Added warn-assignment-bool-context (PR #115234)

2025-01-16 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: I'm sorry it took us a while. The first step is to get the PR out of draft state. https://github.com/llvm/llvm-project/pull/115234 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cf

[clang] [Clang] Implement CWG 2628 "Implicit deduction guides should propagate constraints" (PR #111143)

2025-01-15 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll commented: Changes to C++ DR tests LGTM. https://github.com/llvm/llvm-project/pull/43 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Reapply CWG2369 "Ordering between constraints and substitution" (PR #122423)

2025-01-15 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: This was discussed during Clang C/C++ Language Working Group meeting today, and the consensus seems that this PR shouldn't land before Clang 20 branch, which is scheduled to happen on January 28th. https://github.com/llvm/llvm-project/pull/122423

[clang] [WIP][Modules] Delay deserialization of preferred_name attribute at r… (PR #122726)

2025-01-14 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: I don't feel qualified to review this, but I appreciate that you fix holes in my original quite naive implementation. https://github.com/llvm/llvm-project/pull/122726 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists

[clang] [clang] Add test for CWG170 "Pointer-to-member conversions" (PR #121667)

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

[clang] [libclang/python] Add python bindings for PrintingPolicy (PR #120494)

2025-01-08 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: The failure reminds me of #122063, which was merged just 2 hours ago. Do you mind merging the `main` into your PR and try again? https://github.com/llvm/llvm-project/pull/120494 ___ cfe-commits mailing list cfe-commits@lists.llvm.org htt

[clang] [AArch64][SME] Add diagnostics for SME attributes on lambda functions (PR #121777)

2025-01-07 Thread Vlad Serebrennikov via cfe-commits
@@ -1328,4 +1328,57 @@ void SemaARM::handleInterruptAttr(Decl *D, const ParsedAttr &AL) { ARMInterruptAttr(getASTContext(), AL, Kind)); } +// Check if the function definition uses any AArch64 SME features without +// having the '+sme' feature enabled and warn

[clang] [clang] Improve `make_cxx_dr_status` behavior when error occurs (PR #121785)

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

[clang] [llvm] [SPIRV] Add Target Builtins using Distance ext as an example (PR #121598)

2025-01-06 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll approved this pull request. Yes, you handled the creation of `SemaSPIRV` perfectly. (I'm the one who introduced the rest of `Sema*` parts.) https://github.com/llvm/llvm-project/pull/121598 ___ cfe-commits mailing list cfe-com

[clang] [clang] Add test for CWG203 "Type of address-of-member expression" (PR #121687)

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

[clang] [clang] Improve `make_cxx_dr_status` behavior when error occurs (PR #121785)

2025-01-06 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll created https://github.com/llvm/llvm-project/pull/121785 One of our contributors got confused by the behavior of the script when they incorrectly specified the status of a CWG issue (https://github.com/llvm/llvm-project/pull/102857/files#r1904264872), and this is an

[clang] [libcxx] [Clang] Implement CWG2369 "Ordering between constraints and substitution" (PR #102857)

2025-01-06 Thread Vlad Serebrennikov via cfe-commits
@@ -174,6 +174,26 @@ static_assert(!__is_layout_compatible(StructWithAnonUnion, StructWithAnonUnion3) #endif } // namespace cwg2759 +#if __cplusplus >= 202002L +namespace cwg2770 { // cwg2770: 20 Endilll wrote: > Yes, I implemented what that issue proposed.

[clang] 1229b78 - [clang][NFC] Clean up CWG2396 test

2025-01-06 Thread Vlad Serebrennikov via cfe-commits
Author: Vlad Serebrennikov Date: 2025-01-06T18:32:44+03:00 New Revision: 1229b78f1676d56d0d386a5c4cde8f98a78d0989 URL: https://github.com/llvm/llvm-project/commit/1229b78f1676d56d0d386a5c4cde8f98a78d0989 DIFF: https://github.com/llvm/llvm-project/commit/1229b78f1676d56d0d386a5c4cde8f98a78d0989.

[clang] [clang] Add test for CWG203 "Type of address-of-member expression" (PR #121687)

2025-01-06 Thread Vlad Serebrennikov via cfe-commits
@@ -41,6 +42,141 @@ namespace cwg202 { // cwg202: 3.1 template struct X; } +namespace cwg203 { // cwg203: 3.0 +namespace ex1 { +struct B { + int i; +}; +struct D1 : B {}; +struct D2 : B {}; + +int(D1::*pmD1) = &D2::i; +} // namespace ex1 + +#if __cplusplus >= 202002L +names

[clang] [clang] Add test for CWG203 "Type of address-of-member expression" (PR #121687)

2025-01-06 Thread Vlad Serebrennikov via cfe-commits
@@ -41,6 +42,141 @@ namespace cwg202 { // cwg202: 3.1 template struct X; } +namespace cwg203 { // cwg203: 3.0 +namespace ex1 { +struct B { + int i; +}; +struct D1 : B {}; +struct D2 : B {}; + +int(D1::*pmD1) = &D2::i; +} // namespace ex1 + +#if __cplusplus >= 202002L +names

[clang] [clang] Add test for CWG203 "Type of address-of-member expression" (PR #121687)

2025-01-06 Thread Vlad Serebrennikov via cfe-commits
@@ -41,6 +42,141 @@ namespace cwg202 { // cwg202: 3.1 template struct X; } +namespace cwg203 { // cwg203: 3.0 +namespace ex1 { +struct B { + int i; +}; +struct D1 : B {}; +struct D2 : B {}; + +int(D1::*pmD1) = &D2::i; +} // namespace ex1 + +#if __cplusplus >= 202002L +names

[clang] [clang] Add test for CWG203 "Type of address-of-member expression" (PR #121687)

2025-01-06 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/121687 >From bca2bfe17b71faeebf65eba11adcb70927f878fd Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Sun, 5 Jan 2025 13:58:16 +0300 Subject: [PATCH 1/4] [clang] Add test for CWG203 "Type of address-of-member

[clang] b79d3b9 - [clang][NFC] Move CWG273 test into its own file

2025-01-06 Thread Vlad Serebrennikov via cfe-commits
Author: Vlad Serebrennikov Date: 2025-01-06T17:30:39+03:00 New Revision: b79d3b9519620e34f0e223fdb4a6731db6cda88f URL: https://github.com/llvm/llvm-project/commit/b79d3b9519620e34f0e223fdb4a6731db6cda88f DIFF: https://github.com/llvm/llvm-project/commit/b79d3b9519620e34f0e223fdb4a6731db6cda88f.

[clang] [libcxx] [Clang] Implement CWG2369 "Ordering between constraints and substitution" (PR #102857)

2025-01-06 Thread Vlad Serebrennikov via cfe-commits
@@ -174,6 +174,26 @@ static_assert(!__is_layout_compatible(StructWithAnonUnion, StructWithAnonUnion3) #endif } // namespace cwg2759 +#if __cplusplus >= 202002L +namespace cwg2770 { // cwg2770: 20 Endilll wrote: CWG2770 is still open (`clang/www/make_cxx_dr_s

[clang] [clang] Add test for CWG203 "Type of address-of-member expression" (PR #121687)

2025-01-06 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/121687 >From bca2bfe17b71faeebf65eba11adcb70927f878fd Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Sun, 5 Jan 2025 13:58:16 +0300 Subject: [PATCH 1/3] [clang] Add test for CWG203 "Type of address-of-member

[clang] 3c5f269 - [clang][NFC] Stop using atypical compiler arguments in C++ DR tests

2025-01-06 Thread Vlad Serebrennikov via cfe-commits
Author: Vlad Serebrennikov Date: 2025-01-06T12:58:15+03:00 New Revision: 3c5f2698b02ae3cec13551226f083984ab41f0f3 URL: https://github.com/llvm/llvm-project/commit/3c5f2698b02ae3cec13551226f083984ab41f0f3 DIFF: https://github.com/llvm/llvm-project/commit/3c5f2698b02ae3cec13551226f083984ab41f0f3.

[clang] eff1265 - [clang][NFC] Fix expected directives in C++ DRs

2025-01-06 Thread Vlad Serebrennikov via cfe-commits
Author: Vlad Serebrennikov Date: 2025-01-06T12:29:31+03:00 New Revision: eff126501efc3981727ef0e918c4dca0fa2eb778 URL: https://github.com/llvm/llvm-project/commit/eff126501efc3981727ef0e918c4dca0fa2eb778 DIFF: https://github.com/llvm/llvm-project/commit/eff126501efc3981727ef0e918c4dca0fa2eb778.

[clang] 2a593bb - [clang][NFC] Stop testing CWG2917 in C++98 mode

2025-01-06 Thread Vlad Serebrennikov via cfe-commits
Author: Vlad Serebrennikov Date: 2025-01-06T12:24:18+03:00 New Revision: 2a593bbcf3b022a4ac11a76e03883d6aae2f000c URL: https://github.com/llvm/llvm-project/commit/2a593bbcf3b022a4ac11a76e03883d6aae2f000c DIFF: https://github.com/llvm/llvm-project/commit/2a593bbcf3b022a4ac11a76e03883d6aae2f000c.

[clang] f53abc2 - [clang][NFC] Refactor expected directives in CWG2881 test

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

[clang] 743c84b - [clang][NFC] Move CWG2353 test to its own file

2025-01-05 Thread Vlad Serebrennikov via cfe-commits
Author: Vlad Serebrennikov Date: 2025-01-05T20:46:23+03:00 New Revision: 743c84bb9b79ed70d9bed926c2a173db3b30f587 URL: https://github.com/llvm/llvm-project/commit/743c84bb9b79ed70d9bed926c2a173db3b30f587 DIFF: https://github.com/llvm/llvm-project/commit/743c84bb9b79ed70d9bed926c2a173db3b30f587.

[clang] [clang][NFC] Make all C++ DR tests run in full range of language modes (PR #121688)

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

[clang] [clang] Add tests from CWG156 to CWG1111 (dual-scope lookup for conversion-function-ids) (PR #121654)

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

[clang] [clang] Add tests from CWG156 to CWG1111 (dual-scope lookup for conversion-function-ids) (PR #121654)

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

[clang] [clang] Add tests from CWG156 to CWG1111 (dual-scope lookup for conversion-function-ids) (PR #121654)

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

[clang] [clang][NFC] Make all C++ DR tests run in full range of language modes (PR #121688)

2025-01-05 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll created https://github.com/llvm/llvm-project/pull/121688 This patch plugs holes in RUN lines in C++ DR tests, making sure they are run in C++98 through C++26, with the exception of C++03, which in Clang is synonymous to C++98. >From d6e8b78f2209c4bc29d47b8d196ec9ec9

[clang] [clang] Add test for CWG203 "Type of address-of-member expression" (PR #121687)

2025-01-05 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/121687 >From bca2bfe17b71faeebf65eba11adcb70927f878fd Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Sun, 5 Jan 2025 13:58:16 +0300 Subject: [PATCH 1/2] [clang] Add test for CWG203 "Type of address-of-member

[clang] [clang] Add test for CWG203 "Type of address-of-member expression" (PR #121687)

2025-01-05 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll created https://github.com/llvm/llvm-project/pull/121687 This patch adds test for [CWG203](https://cplusplus.github.io/CWG/issues/203.html). Author was asking to change the type of pointer-to-member expression to be closer to how it's written as opposed to where the

[clang] [clang] Add test for CWG156 "Name lookup for conversion functions" (PR #121654)

2025-01-05 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/121654 >From dcd29ca8c77e24c532ca8300a7e46f5498ffebbb Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Sat, 4 Jan 2025 19:37:46 +0300 Subject: [PATCH 1/2] [clang] Add test for CWG156 "Name lookup for conversion

[clang] [clang] Add test for CWG156 "Name lookup for conversion functions" (PR #121654)

2025-01-05 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: > I wonder if we just mark that as superseded and/or N/A. To do that, we need to downgrade CWG from being available in Clang 3.2 to "partial", and merge in at least the test that doesn't pass. Maybe we should do that anyway. > The original requirements that lookup must find

[clang] [clang] Add test for CWG156 "Name lookup for conversion functions" (PR #121654)

2025-01-05 Thread Vlad Serebrennikov via cfe-commits
@@ -922,6 +922,49 @@ namespace cwg155 { // cwg155: dup 632 // expected-warning@-1 {{braces around scalar initializer}} } +namespace cwg156 { // cwg156: partial +namespace ex1 { +struct A { + operator int(); +} a; +void foo() { + typedef int T; + a.operator T(); // T is fo

[clang] [clang] Add test for CWG794 "Base-derived conversion in member type of pointer-to-member conversion" (PR #121660)

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

[clang] [clang] Add test for CWG192 "Name lookup in parameters" (PR #121679)

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

[clang] [clang] Add test for CWG192 "Name lookup in parameters" (PR #121679)

2025-01-04 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll created https://github.com/llvm/llvm-project/pull/121679 This patch adds a rather simple test for [CWG192](https://cplusplus.github.io/CWG/issues/192.html). Parameter declarations of member functions are not complete-class contexts (unlike default arguments), so the

[clang] [clang] Add test for CWG190 "Layout-compatible POD-struct types" (PR #121668)

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

[clang] [clang] Add test for CWG190 "Layout-compatible POD-struct types" (PR #121668)

2025-01-04 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll created https://github.com/llvm/llvm-project/pull/121668 This patch adds test for [CWG190](https://cplusplus.github.io/CWG/issues/190.html), leveraging `__is_layout_compatible` intrinsic added for C++20 `std::is_layout_compatible`. I conservatively set the status to

[clang] [clang] Add test for CWG170 "Pointer-to-member conversions" (PR #121667)

2025-01-04 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll created https://github.com/llvm/llvm-project/pull/121667 This patch adds test for [CWG170](https://cplusplus.github.io/CWG/issues/170.html). The resolution adds explicit undefined behavior, so I think the best we can do is to put the test into constexpr evaluator. C

[clang] [Clang] Consider preferred_type in bitfield warnings (#116760) (PR #116785)

2025-01-04 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: > and I thought making just preferred_type warnings early would be especially > insane :D I don't necessarily agree. `preferred_type` is a relatively new thing, so we can try doing something new here. > [edit: I just realized even that might need to be an option because I can

[clang] [clang] Add test for CWG794 "Base-derived conversion in member type of pointer-to-member conversion" (PR #121660)

2025-01-04 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll created https://github.com/llvm/llvm-project/pull/121660 This patch adds a test for [CWG794](https://cplusplus.github.io/CWG/issues/794.html), which is an NB comment closed as NAD. Author was asked to bring a paper to Evolution, which never happened. So we test for

[clang] [Clang] Consider preferred_type in bitfield warnings (#116760) (PR #116785)

2025-01-04 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: Looking at diagnostics in the test you add, I wonder why don't we issue them, and especially the fixit, when we parse bit-field declaration. Why waiting until assignment happens? https://github.com/llvm/llvm-project/pull/116785 ___ cfe

[clang] [clang] Add test for CWG156 "Name lookup for conversion functions" (PR #121654)

2025-01-04 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll created https://github.com/llvm/llvm-project/pull/121654 This patch adds test for [CWG156](https://cplusplus.github.io/CWG/issues/156.html). The most relevant piece of current wording is [[basic.lookup.unqual]/5](https://eel.is/c++draft/basic.lookup#unqual-5): > An

[clang] [clang] Update C++ DR status page (PR #121642)

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

[clang] [clang] Update C++ DR status page (PR #121642)

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

[clang] [clang] Update C++ DR status page (PR #121642)

2025-01-04 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll created https://github.com/llvm/llvm-project/pull/121642 This patch brings our C++ DR status page up to date with WG21 updates. [CWG1223](https://cplusplus.github.io/CWG/issues/1223.html) "Syntactic disambiguation and _trailing-return-types_" is resolved by [P2915R0

[clang] [libclang/python] Add python binding for clang_Cursor_isAnonymousRecordDecl (PR #120483)

2024-12-19 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll approved this pull request. You should add a release note and a PR description. LGTM otherwise. https://github.com/llvm/llvm-project/pull/120483 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/c

[clang] [llvm] Expose format (attribute) info for function declarations in Clang Index API (PR #113754)

2024-12-18 Thread Vlad Serebrennikov via cfe-commits
@@ -71,3 +71,5 @@ pythonenv* /clang/utils/analyzer/projects/*/RefScanBuildResults # automodapi puts generated documentation files here. /lldb/docs/python_api/ +silver-debug +silver-build Endilll wrote: Those are unrelated changes that should remain local to yo

[clang] [llvm] Expose format (attribute) info for function declarations in Clang Index API (PR #113754)

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

[clang] [llvm] Expose format (attribute) info for function declarations in Clang Index API (PR #113754)

2024-12-18 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll commented: I'm sorry it took us a while to notice this PR. I think that documentation of new functions should describe what happens on unhappy code paths, too. I also would like to see unit tests and a release note. Even more, I'd like @AaronBallman to sign this off

[clang] Enable AST mutation in the constant evaluator (PR #115168)

2024-11-26 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: > For such an implementation that makes that choice, it would seem appropriate > for define_aggregate to also be idempotent. But that should be a specific > rule for that implementation, not a rule that appears in the standard. And we > certainly shouldn't change the standard to

[clang] Enable AST mutation in the constant evaluator (PR #115168)

2024-11-25 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: > > > the special "the language rules say this is manifestly constant > > > evaluated" cases that should be able to perform AST mutations, that we > > > need to be extremely careful to invoke at exactly the right times and in > > > exactly the right cases and to invoke only once

[clang] [lldb] [Clang] Improve Sema diagnostic performance for __builtin_counted_by_ref (PR #116719)

2024-11-25 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: For the record, Aaron is not on vacation. So if you need his sign-off, you should wait. https://github.com/llvm/llvm-project/pull/116719 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/list

[clang] Enable AST mutation in the constant evaluator (PR #115168)

2024-11-25 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: > the special "the language rules say this is manifestly constant evaluated" > cases that should be able to perform AST mutations, that we need to be > extremely careful to invoke at exactly the right times and in exactly the > right cases and to invoke only once Can you expand

[clang] Enable AST mutation in the constant evaluator (PR #115168)

2024-11-25 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: @zygoloid I definitely don't disagree with your points. After extensive discussions with other maintainers (Shafik, Corentin, Erich, Aaron), I went from passing the callback explicitly to very implicit approach, because of reasons that lie outside of usage of AST in Clang itself

[clang] Enable AST mutation in the constant evaluator (PR #115168)

2024-11-25 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: I added Sema callback into the new interpreter in 0b2d92e0fed41ee2428c3ef8b8369790a1279a21. I think it went smoothly, save for the fact that source locations are not always readily available there, but they are need to correctly emit diagnostics from Sema. I invite @tbaederr to

[clang] Enable AST mutation in the constant evaluator (PR #115168)

2024-11-25 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/115168 >From 5ca48e03412b1b8e9253f13356b9cc957f6fd9e5 Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Wed, 6 Nov 2024 17:58:43 +0300 Subject: [PATCH 01/13] Add EvalASTMutator interface with `InstantiateFunctio

[clang] Enable AST mutation in the constant evaluator (PR #115168)

2024-11-15 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/115168 >From 5ca48e03412b1b8e9253f13356b9cc957f6fd9e5 Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Wed, 6 Nov 2024 17:58:43 +0300 Subject: [PATCH 01/11] Add EvalASTMutator interface with `InstantiateFunctio

[clang] Enable AST mutation in the constant evaluator (PR #115168)

2024-11-15 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/115168 >From 5ca48e03412b1b8e9253f13356b9cc957f6fd9e5 Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Wed, 6 Nov 2024 17:58:43 +0300 Subject: [PATCH 01/10] Add EvalASTMutator interface with `InstantiateFunctio

[clang] Enable AST mutation in the constant evaluator (PR #115168)

2024-11-15 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: > @zygoloid @katzdm for awareness This PR is still in flux. Discussions are lengthy and typically happen in meetings. My plan is to get to a stable point, write down how we got there, alternatives rejected (with reasoning), and get the PR out of the draft status. This would be

[clang] Enable AST mutation in the constant evaluator (PR #115168)

2024-11-15 Thread Vlad Serebrennikov via cfe-commits
@@ -8328,6 +8329,13 @@ class ExprEvaluatorBase const FunctionDecl *Definition = nullptr; Stmt *Body = FD->getBody(Definition); +if (Info.Ctx.getLangOpts().CPlusPlus26 && Info.getASTMutator() && Endilll wrote: Fixed https://github.com/llvm/llvm-pr

[clang] Enable AST mutation in the constant evaluator (PR #115168)

2024-11-15 Thread Vlad Serebrennikov via cfe-commits
@@ -182,6 +182,17 @@ struct TypeInfoChars { } }; +// Interface that allows constant evaluator to mutate AST. +// Sema is the only entity that can implement this. +struct EvalASTMutator { + virtual ~EvalASTMutator() = default; + + virtual void + InstantiateFunctionDefiniti

[clang] Enable AST mutation in the constant evaluator (PR #115168)

2024-11-15 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/115168 >From 5ca48e03412b1b8e9253f13356b9cc957f6fd9e5 Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Wed, 6 Nov 2024 17:58:43 +0300 Subject: [PATCH 1/8] Add EvalASTMutator interface with `InstantiateFunctionD

[clang] Enable AST mutation in the constant evaluator (PR #115168)

2024-11-08 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/115168 >From 5ca48e03412b1b8e9253f13356b9cc957f6fd9e5 Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Wed, 6 Nov 2024 17:58:43 +0300 Subject: [PATCH 1/6] Add EvalASTMutator interface with `InstantiateFunctionD

[clang] Enable AST mutation in the constant evaluator (PR #115168)

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

[clang] Add `EvalASTMutator` interface (PR #115168)

2024-11-07 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/115168 >From 5ca48e03412b1b8e9253f13356b9cc957f6fd9e5 Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Wed, 6 Nov 2024 17:58:43 +0300 Subject: [PATCH 1/5] Add EvalASTMutator interface with `InstantiateFunctionD

[clang] Add `EvalASTMutator` interface (PR #115168)

2024-11-07 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/115168 >From 5ca48e03412b1b8e9253f13356b9cc957f6fd9e5 Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Wed, 6 Nov 2024 17:58:43 +0300 Subject: [PATCH 1/4] Add EvalASTMutator interface with `InstantiateFunctionD

[clang] [Clang] Fix name lookup for dependent bases (PR #114978)

2024-11-06 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: > > > @Endilll, please, could you take a look? > > > > > > My knowledge of wording about templates is not deep enough, unfortunately. > > Could you, please, suggest someone who can review this part? I've already added several people who should be able to, but mind that we're v

[clang] Add `EvalASTMutator` interface (PR #115168)

2024-11-06 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/115168 >From 5ca48e03412b1b8e9253f13356b9cc957f6fd9e5 Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Wed, 6 Nov 2024 17:58:43 +0300 Subject: [PATCH 1/3] Add EvalASTMutator interface with `InstantiateFunctionD

[clang] Add `EvalASTMutator` interface (PR #115168)

2024-11-06 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll created https://github.com/llvm/llvm-project/pull/115168 None >From 5ca48e03412b1b8e9253f13356b9cc957f6fd9e5 Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Wed, 6 Nov 2024 17:58:43 +0300 Subject: [PATCH 1/2] Add EvalASTMutator interface with `InstantiateFun

[clang] [Clang] Fix name lookup for dependent bases (PR #114978)

2024-11-06 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: > @Endilll, please, could you take a look? My knowledge of wording about templates is not deep enough, unfortunately. https://github.com/llvm/llvm-project/pull/114978 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists

[clang] [Clang] Fix name lookup for dependent bases (PR #114978)

2024-11-06 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: > Also, do you have any ideas why the Win pipeline fails with checkout failure? > How can I fix it? It seems to be unrelated to you. Might be fixed when you'll push a new commit. https://github.com/llvm/llvm-project/pull/114978 ___ cfe

[clang] [Clang] Fix name lookup for dependent bases (PR #114978)

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

[clang] Add Shafik and hstk30 as maintainers for issue triage (PR #114781)

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

[clang] [libclang/python/tests] Clean up imports (PR #114409)

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

[clang] [libclang/python/tests] Remove unused variables (PR #114397)

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

[clang] [libclang/python/tests] Remove Python <3.6 workarounds (PR #114399)

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

[clang] [libclang/python] Fix incorrect assert in test (PR #114395)

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

[clang] [libclang/python] Clean up tests (PR #114383)

2024-10-31 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: Well, you fix of the test is not really functional either, but definitely deserves more attention than the rest of the changes. https://github.com/llvm/llvm-project/pull/114383 ___ cfe-commits mailing list cfe-commits@lists.llvm.org htt

[clang] [libclang/python] Clean up tests (PR #114383)

2024-10-31 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll requested changes to this pull request. Thank you for putting effort into this! You're mixing up non-functional and functional changes here (thank you for highlighting the mistake you've previously made, it's buried rather deep!), so I'd like to ask you to split this

[clang] [clang][Index][USR][NFC] Allow customizing langopts for USR generation (PR #109574)

2024-10-30 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: > @Endilll Could you please help me reaching out to the right set of reviewers? Aaron noticed it faster 😄 https://github.com/llvm/llvm-project/pull/109574 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cg

[clang] Nominate Shafik Yaghmour and Vlad Serebrennikov for C++ conformance (PR #114071)

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

[clang] Nominate Vlad Serebrennikov for C++ DRs (PR #114040)

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

[clang] [clang][NFC] Add test for CWG issues about linkage in cross-TU context (PR #113736)

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

[clang] [clang][NFC] Add test for CWG issues about linkage in cross-TU context (PR #113736)

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

[clang] [clang][NFC] Add test for CWG issues about linkage in cross-TU context (PR #113736)

2024-10-28 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/113736 >From b23ce76d3db79eab6433bef1bd3fc9d26bcb3309 Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Fri, 25 Oct 2024 23:05:06 +0300 Subject: [PATCH 1/5] [clang][NFC] Add test for CWG issues about linkage in

[clang] [clang][NFC] Add test for CWG issues about linkage in cross-TU context (PR #113736)

2024-10-28 Thread Vlad Serebrennikov via cfe-commits
@@ -0,0 +1,548 @@ +// RUN: rm -rf %t +// RUN: mkdir %t +// RUN: split-file --leading-lines %s %t +// RUN: %clang_cc1 -std=c++20 -pedantic-errors -fexceptions -fcxx-exceptions %t/cwg1884_A.cppm -triple x86_64-unknown-unknown -emit-module-interface -o %t/cwg1884_A.pcm +// RUN: %cl

[clang] [clang][NFC] Add test for CWG issues about linkage in cross-TU context (PR #113736)

2024-10-28 Thread Vlad Serebrennikov via cfe-commits
@@ -0,0 +1,548 @@ +// RUN: rm -rf %t +// RUN: mkdir %t +// RUN: split-file --leading-lines %s %t +// RUN: %clang_cc1 -std=c++20 -pedantic-errors -fexceptions -fcxx-exceptions %t/cwg1884_A.cppm -triple x86_64-unknown-unknown -emit-module-interface -o %t/cwg1884_A.pcm +// RUN: %cl

[clang] [clang][NFC] Add test for CWG issues about linkage in cross-TU context (PR #113736)

2024-10-28 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/113736 >From b23ce76d3db79eab6433bef1bd3fc9d26bcb3309 Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Fri, 25 Oct 2024 23:05:06 +0300 Subject: [PATCH 1/5] [clang][NFC] Add test for CWG issues about linkage in

[clang] [clang][NFC] Add test for CWG issues about linkage in cross-TU context (PR #113736)

2024-10-28 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/113736 >From b23ce76d3db79eab6433bef1bd3fc9d26bcb3309 Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Fri, 25 Oct 2024 23:05:06 +0300 Subject: [PATCH 1/4] [clang][NFC] Add test for CWG issues about linkage in

[clang] [clang][NFC] Add test for CWG issues about linkage in cross-TU context (PR #113736)

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

[clang] [clang][NFC] Add test for CWG issues about linkage in cross-TU context (PR #113736)

2024-10-26 Thread Vlad Serebrennikov via cfe-commits
@@ -0,0 +1,548 @@ +// RUN: rm -rf %t +// RUN: mkdir %t +// RUN: split-file --leading-lines %s %t +// RUN: %clang_cc1 -std=c++20 -pedantic-errors -fexceptions -fcxx-exceptions %t/cwg1884_A.cppm -triple x86_64-unknown-unknown -emit-module-interface -o %t/cwg1884_A.pcm +// RUN: %cl

[clang] [clang][NFC] Add test for CWG issues about linkage in cross-TU context (PR #113736)

2024-10-26 Thread Vlad Serebrennikov via cfe-commits
@@ -0,0 +1,42 @@ +// RUN: rm -rf %t +// RUN: mkdir %t +// RUN: split-file --leading-lines %s %t +// RUN: %clang_cc1 -std=c++20 -pedantic-errors -fexceptions -fcxx-exceptions %t/cwg279_A.cppm -triple x86_64-unknown-unknown -emit-module-interface -o %t/cwg279_A.pcm +// RUN: %clang

[clang] [clang][NFC] Add test for CWG issues about linkage in cross-TU context (PR #113736)

2024-10-26 Thread Vlad Serebrennikov via cfe-commits
@@ -0,0 +1,42 @@ +// RUN: rm -rf %t +// RUN: mkdir %t +// RUN: split-file --leading-lines %s %t +// RUN: %clang_cc1 -std=c++20 -pedantic-errors -fexceptions -fcxx-exceptions %t/cwg279_A.cppm -triple x86_64-unknown-unknown -emit-module-interface -o %t/cwg279_A.pcm +// RUN: %clang

[clang] [clang][NFC] Add test for CWG issues about linkage in cross-TU context (PR #113736)

2024-10-26 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/113736 >From b23ce76d3db79eab6433bef1bd3fc9d26bcb3309 Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Fri, 25 Oct 2024 23:05:06 +0300 Subject: [PATCH 1/2] [clang][NFC] Add test for CWG issues about linkage in

[clang] [clang][NFC] Add test for CWG issues about linkage in cross-TU context (PR #113736)

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

[clang] [llvm] [AMDGPU] Add a type for the named barrier (PR #113614)

2024-10-25 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: How did this get through pre-merge testing, I wonder. https://github.com/llvm/llvm-project/pull/113614 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][NFC] Add test for CWG issues about linkage in cross-TU context (PR #113736)

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

  1   2   3   4   5   6   7   8   9   10   >